Until Google provides SPM support for its Google Cast SDK this repository delivers official XCFrameworks as Swift packages for easy integration into projects.
Use 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.
To make the generated framework available:
- Download the Dynamic framework from the Google Cast SDK manual setup.
- Rename the corresponding zip as
GoogleCast.xcframework.zip. - Calculate the zip checksum using
swift package compute-checksum /path/to/GoogleCast.xcframework.zip - Update the
Package.swiftin this repository:- Bump the framework version number to match the new SDK version.
- Replace the existing checksum with the value obtained above.
- Adjust the deployment target according to the official SDK documentation.
- Update the
swift-tools-versionto a version that supports the selected deployment target.
- Commit the changes on
mainand create a corresponding tag. - Push the commit and the tag to GitHub.
- Attach the binary to the tag on GitHub.
Do not commit the binaries in the repository, as this would slow down checkouts made by SPM as the repository grows.