This article discusses the various development tools available when working on Pillarbox.
A Makefile provides several useful development-oriented commands. Simply run:
make
to list all available commands.
Since Apple players cannot play local manifests we are using Python to run a simple web server serving various test streams from a local directory. These streams are used throughout unit test suites.
The web server must be manually started using:
make test-streams-start
before running tests. It can be stopped at any time with:
make test-streams-stop
If unit tests fail you should check that streams are served correctly at http://localhost:8123 and start the server if needed. Note that some sample streams require ~20 seconds to be fully available after the server was started.
Quality checks can be run using:
make check-quality
This ensures that Swift files, scripts and documentation conform to common best practices. Many issues can be automatically fixed by running:
make fix-quality
Git hooks can be installed by running the following command:
make git-hook-install
and uninstalled by running the following command:
make git-hook-uninstall
Run this command to remove unnecessary imports:
make clean-imports
Run this command to remove unused code:
make find-dead-code
You can reload SPM dependencies by running:
make spm-reload
An editor configuration file and several linter configuration files are provided to ensure common styling and best practices. Editors can usually be configured to apply some of these rules automatically and consistently.
Xcode Text Editing settings should be configured as follows:
- Enable Automatically trim trailing whitespaces with Including whitespace-only lines enabled as well.
- Set Default Text Encoding to UTF-8.
- Set Default Line Endings to macOS / Unix (LF).
- Use Spaces for indentation (with 4 spaces both for Tab Width and Indent Width).
Please ensure that the target an Xcode preview belongs to is selected before attempting to render an Xcode preview (otherwise rendering will crash). Note that attempting to use the Pillarbox
umbrella target does not work.
We are currently using cloud signing with automatic provisioning updates.