Skip to content

SRGSSR/castor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Castor logo

Overview

Releases Platforms SPM compatible GitHub license TestFlight

Castor is an SDK for easy Google Cast integration in iOS applications.

Features

  • Ready-made standard player, mini player, and device selection views for effortless integration.
  • First-class integration with SwiftUI for effortless custom view integration.
  • APIs for device discovery and playback management, focusing on fast and responsive UI updates.
  • Built-in support for transitions between local and remote playback.
  • Playlist management.
  • Support for alternative audio tracks and subtitles.
  • Volume management.
  • Metadata support.
  • Animated Cast button and icon.
  • Playback speed controls.
  • Looping playback.

Showcase

Showcase

From left to right:

  • Screenshot 1: Standard device selection view.
  • Screenshot 2: Standard mini player view.
  • Screenshots 3, 4 and 5: Standard player view, including playlist management and playback settings menu.

Compatibility

The library is suitable for applications running on iOS 16 and above.

Integration

The library can be integrated using Swift Package Manager directly within Xcode. You can also declare the library as a dependency of another one directly in the associated Package.swift manifest.

Documentation

Castor documentation includes articles, tutorials and an API reference to help you learn more about available features and how to integrate them into your application.

Tip

If you discover errors in the documentation or if some documentation is missing please file a dedicated issue. You can also directly submit documentation improvements via pull requests.

DocC documentation

Documentation is available as a DocC documentation catalog. This catalog must be built by opening the project with Xcode and selecting Product > Build Documentation. You can then access it right from within the Xcode documentation window.

Online documentation

Documentation for Castor can also be found online on Swift Package Index.

Tip

Documentation available from the above link opens for the latest tag. Use Swift Package Index navigation top bar to quickly switch to another tag or main.

Miscellaneous documentation

Further documentation is also available by following the links below:

Plugins

The package provides a single plugin which automatically inserts correct versioning information into binaries. This plugin must be trusted interactively when a project integrating Castor is built using Xcode for the first time.

On a continuous integration server you must trust plugins automatically by setting an appropriate default:

defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES

If you are using Xcode Cloud this can be achieved with a custom build script.

If your project is built with xcodebuild directly the same effect can be achieved by passing the -skipPackagePluginValidation option.

Important

Build services such as GitHub Actions, Bitrise, CircleCI, and Travis CI often provide caching mechanisms to accelerate CI/CD pipelines, including caching Swift package sources. Castor leverages Git tags from its package repository to automatically determine the correct version. However, this process depends on having up-to-date local tags, which may not be guaranteed when a package cache is used.

To ensure accuracy and reliability, we recommend performing clean builds when delivering your application via a delivery pipeline. Caches can still be utilized for routine continuous integration tasks to save time during development.

Contributing

If you want to contribute to the project have a look at our contributing guide.

License

See the LICENSE file for more information.