-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
65 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// swift-tools-version:5.3 | ||
import PackageDescription | ||
|
||
|
||
let version = "0.6.1" | ||
let mediasoupChecksum = "30f275dca53705e8177d953a365dee829eddfe3df35231302b5d67edaf7cbc56" | ||
let webrtcChecksum = "542bbf59b77450aceb1fddd8bb5a60540fb1c9af400dc6565077f18e63c96124" | ||
|
||
|
||
let package = Package( | ||
name: "Mediasoup-Client-Swift", | ||
platforms: [ | ||
.iOS(.v14) | ||
], | ||
products: [ | ||
.library( | ||
name: "Mediasoup", | ||
targets: [ | ||
"Mediasoup", | ||
"WebRTC" | ||
] | ||
) | ||
], | ||
dependencies: [ | ||
], | ||
targets: [ | ||
.binaryTarget( | ||
name: "Mediasoup", | ||
url: "https://github.com/VLprojects/mediasoup-client-swift/releases/download/\(version)/Mediasoup.xcframework.zip", | ||
checksum: mediasoupChecksum | ||
), | ||
.binaryTarget( | ||
name: "WebRTC", | ||
url: "https://github.com/VLprojects/mediasoup-client-swift/releases/download/\(version)/WebRTC.xcframework.zip", | ||
checksum: webrtcChecksum | ||
) | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
read -p "Enter version number: " VERSION | ||
|
||
sed -i '' "s/let version = \".*\"/let version = \"$VERSION\"/" Package.swift | ||
|
||
RUN_PATH=$(pwd) | ||
cd $RUN_PATH/bin | ||
rm -f $RUN_PATH/build/Mediasoup.xcframework.zip | ||
zip -r $RUN_PATH/build/Mediasoup.xcframework.zip Mediasoup.xcframework -x "*.DS_Store" | ||
rm -f $RUN_PATH/build/WebRTC.xcframework.zip | ||
zip -r $RUN_PATH/build/WebRTC.xcframework.zip WebRTC.xcframework -x "*.DS_Store" | ||
cd $RUN_PATH | ||
|
||
MEDIASOUP_CHECKSUM=$(swift package compute-checksum ./build/Mediasoup.xcframework.zip) | ||
WEBRTC_CHECKSUM=$(swift package compute-checksum ./build/WebRTC.xcframework.zip) | ||
sed -i '' "s/let mediasoupChecksum = \".*\"/let mediasoupChecksum = \"$MEDIASOUP_CHECKSUM\"/" Package.swift | ||
sed -i '' "s/let webrtcChecksum = \".*\"/let webrtcChecksum = \"$WEBRTC_CHECKSUM\"/" Package.swift | ||
sed -i '' "s/spec.version = \".*\"/spec.version = \"$VERSION\"/" Mediasoup-Client-Swift.podspec | ||
sed -i '' "s/pod 'Mediasoup-Client-Swift', '.*'/pod 'Mediasoup-Client-Swift', '$VERSION'/" README.md | ||
|
||
cd Example | ||
pod install |