Skip to content

Commit

Permalink
Merge branch 'support-spm'
Browse files Browse the repository at this point in the history
  • Loading branch information
fedulvtubudul committed Jan 10, 2024
2 parents a91f1df + fca27ba commit 09c0c56
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Mediasoup-Client-Swift.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Pod::Spec.new do |spec|
}

spec.name = "Mediasoup-Client-Swift"
spec.version = "0.6.0"
spec.version = "0.6.1"
spec.platform = :ios, "14.0"
spec.module_name = "Mediasoup"
spec.module_map = "Mediasoup/Mediasoup.modulemap"
Expand Down
38 changes: 38 additions & 0 deletions Package.swift
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
)
]
)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ Swift wrapper for libmediasoupclient with iOS support

2. **Ease of integration**

If you don't need to customize Mediasoup-Client-Swift itself or its dependencies, just add a line to your Podfile:
If you don't need to customize Mediasoup-Client-Swift itself or its dependencies, just use Swift Package Manager or CocoaPods:

```Ruby
pod 'Mediasoup-Client-Swift', '0.6.0'
pod 'Mediasoup-Client-Swift', '0.6.1'
```

3. **Ease of building from scratch**
Expand Down Expand Up @@ -152,7 +152,7 @@ Mediasoup-Client-Swift has almost no logic, it's only a convenient wrapper for o

- [x] Add data channel support (consuming)

- [ ] Support integration via SPM
- [x] Support integration via SPM

- [ ] Add documentation for Mediasoup-Client-Swift public interface

Expand Down
23 changes: 23 additions & 0 deletions bump.sh
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

0 comments on commit 09c0c56

Please sign in to comment.