This repository provides a Package.swift manifest to enable integration of the
Google Cast SDK for iOS via Swift Package Manager (SPM).
This repository does not contain the source code or binary artifacts of the Google Cast SDK. It acts solely as a pointer to download the official binary distribution securely.
-
In Xcode, select File > Add Packages...
-
Enter the repository URL:
https://github.com/googlecast/google-cast-ios-sdk -
Select your desired versioning rules.
-
Click Add Package.
-
Select the product (GoogleCastDynamic or GoogleCastStatic) you want to add to your target. Do not try to add both.
Note on Static Framework: If you choose the static variant (
GoogleCastStatic), you must complete the following manual steps:- Add Linker Flags: In your Xcode project, add the flags
-ObjC -lc++to Build Settings > Other Linker Flags. - Add Asset Bundles: Due to limitations with Swift Package Manager, it is not possible to automatically bundle required asset resources (such as UI images, storyboards, and localization files) with the static version of the framework. If you require Cast UI components, you must manually integrate these assets. To do so, download the static SDK archive from the official Google Cast iOS SDK developer documentation. Locate the
Resourcesfolder in the unzipped directory and drag all of the.bundlefiles into your Xcode project. Check 'Copy all items if needed', and add to all targets.
Alternatively, you can use the dynamic version (
GoogleCastDynamic), which natively includes all necessary assets and does not require additional linker flags. - Add Linker Flags: In your Xcode project, add the flags
For instructions on how to use the Google Cast SDK in your application, please refer to the official Google Cast Developer Documentation.
Review How to Contribute for details on submitting issues or improvements to this manifest.
This repository manifest is licensed under the Apache 2.0 License. See the LICENSE file for details. The Google Cast SDK itself is governed by its own terms of service and license agreement.
Eligibility for the Google Open Source Software Vulnerability Rewards Program is determined by the Google Open Source Software Vulnerability Reward Program Rules.