Skip to content

SRGSSR/playsrg-apple

Repository files navigation

SRG Media Player logo

About

Play SRG is the SRG SSR (Swiss Broadcasting Corporation) audio and video platform, provided as a distinct service for each of its business units (RSI, RTR, RTS, SRF and SWI). This repository contains the source code of the Play SRG applications for iOS and tvOS.

The Play platform is more generally available on the web, on Android phones and devices running Android TV:

Platform Play RSI Play RTR Play RTS Play SRF Play SWI
iOS / tvOS πŸŽπŸ“±πŸ“ΊπŸš— πŸŽπŸ“±πŸ“ΊπŸš— πŸŽπŸ“±πŸ“ΊπŸš— πŸŽπŸ“±πŸ“ΊπŸš— πŸŽπŸ“±πŸ“Ί
Android / Android TV πŸ€–πŸ“±πŸ“ΊπŸš— πŸ€–πŸ“±πŸ“ΊπŸš— πŸ€–πŸ“±πŸ“ΊπŸš— πŸ€–πŸ“±πŸ“ΊπŸš— πŸ€–πŸ“±
Web πŸ–₯πŸ“±πŸ’» πŸ–₯πŸ“±πŸ’» πŸ–₯πŸ“±πŸ’» πŸ–₯πŸ“±πŸ’» πŸ–₯πŸ“±πŸ’»

Screenshots

Features

The application provides a rich set of functionalities, among which:

  • Access to our content, whether it is broadcast on TV, radio or online.
  • A TV guide.
  • An audio mini player (iOS only).
  • Subscriptions with push notifications (iOS only).
  • Resume playback and continuous playback.
  • Favorites.
  • Downloads (iOS only).
  • AirPlay, Google Cast and CarPlay support (iOS only).
  • VoiceOver and larger font support for better accessibility.
  • Handoff support (iOS only).

Depending on the business unit some functionalities might not be available (e.g. SWI has no radio content).

Compatibility

The project runs on iOS 14.1, tvOS 14 and above and must be opened with the latest Xcode version.

Required tools

  • Building the project requires command-line tools for icon generation, easily installed with Homebrew:

     brew install imagemagick ghostscript jq
    
  • Some project dependencies are retrieved using CocoaPods. Be sure that this tool is available on your system:

     which pod
     pod --version
    

    If not, install it:

     brew install cocoapods
    

Building the project

A Makefile provides several targets to prepare project dependencies. The available targets can be listed by running the following command from the project root folder:

make help

Project setup

After checking out the project run:

make setup

to setup the project and its dependencies.

Private settings

Private project settings (keys, tokens, etc.) are stored in a private repository, pulled under the Configuration directory when running make setup (or any other target depending on it). The SHA-1 of the configuration commit which is used is explicitly provided in the Makefile. Settings are therefore versioned alongside the project, providing for reproducible builds.

If you need to make changes to the settings:

  1. Perform the required changes in the Configuration directory (and in the project as well if needed).
  2. Switch to the Configuration directory and commit changes there.
  3. Update the Makefile CONFIGURATION_COMMIT_SHA1 variable to point at the configuration commit to use.
  4. Push all commits when you are ready.

The project can be built without private settings but some features might not be available (e.g. push notifications) or configured in a different way.

Running the project

Simply open the project with Xcode and wait until all dependencies have been retrieved. Then build and run the project.

Contributing

If you want to contribute to the project as an external contributor, have a look at our contributing guide.

Quality checks

Checking quality, the project requires command-line tools:

brew install swiftlint shellcheck yamllint

For rubocop, be sure that this tool is available on your system, or execute:

bundle install --path vendor/bundle

When all command-line tools are installed, check code quality can be done using:

make check-quality

This ensures that Swift files, and scripts are conform to common best practices.

Licenses for libraries used in the project

In the iOS application settings, licenses of libraries used in the project can be consulted. To build the list, running an iOS target requires LicensePlist.

brew install licenseplist

SRGSSR project

Some links to internal Jira SRGSSR instance can be found in commit messages, branch names or pull request titles.

Git hooks installation

Project git hooks can be installed to help quality checks and commit messages for internal SRGSSR project. Install them by running the following command:

make git-hook-install

Translations

Translation tool is crowdin.com. The following scripts need Crowdin CLI.

  • Review new source translation files in Translations folder:

     make generate-translations
    
  • Pushing new source translations from Translations folder:

     make push-translations
    
  • Pulling latest translated translations:

     make pull-translations
    

Releasing binaries

The proprietary project uses fastlane to release binaries either for internal purposes or for the AppStore to release binaries.

A github page with release notes pages and help pages for builds is also published with a fastlane lane.

See release checklist and fastlane lanes for details.

Specifications

Follow the links below for feature specifications and technical details: