Skip to content

Latest commit

 

History

History
111 lines (68 loc) · 3.12 KB

DEVELOPMENT_TOOLS.md

File metadata and controls

111 lines (68 loc) · 3.12 KB

Development tools

This article discusses the various development tools available when working on Pillarbox.

Makefile

A Makefile provides several useful development-oriented commands. Simply run:

make

to list all available commands.

Local test streams

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

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

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

Clean imports

Run this command to remove unnecessary imports:

make clean-imports

Find dead code

Run this command to remove unused code:

make find-dead-code

Reload SPM dependencies

You can reload SPM dependencies by running:

make spm-reload

Editor configuration

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

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).

Visual Studio Code

Xcode previews

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.

Code signing

We are currently using cloud signing with automatic provisioning updates.