- The libsrt with xcframework project.
- This is a project to make libsrt easier to use with Swift Package Manager (SPM).
Note
This is provided for use with HaishinKit. It does not prevent you from using it individually in your own environment.
| iOS | tvOS | macOS | visionOS | watchOS | macOS catalyst |
|---|---|---|---|---|---|
| 13.0+ | 13.0+ | 10.15+ | 1.0+ | - | - |
You can use it from SPM as follows.
- ${version} refers to the release version v1.5.4.
- The checksum is listed in the RELEASE notes.
// swift-tools-version: 5.7
import PackageDescription
let package = Package(
dependencies: [
],
targets: [
.binaryTarget(
name: "libsrt",
url: "https://github.com/HaishinKit/libsrt-xcframework/releases/download/${version}/libsrt.xcframework.zip",
checksum: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
),
]
)The checksum can be obtained using the following command:
$ swift package compute-checksum /path/to/libsrt.xcframework.zip## clone dependencies
$ build-clone.sh
## build libsrt.a
$ build-ios.sh
# $ build-macos.sh ...
## make xcframework. only succeeds when the build for all platforms is successful.
## If you only need iOS, please comment out the contents of the .sh file.
$ build-xcframework.sh- libsrt.xcframeworks is MPLv2.0 License