Skip to content

Commit 7d32d68

Browse files
Add iOS and Android bindings (#253)
* save * trying to get it to work with firefox * save * reset unrelated changes * the issue is where the library is being dumped * got ios lib to build * update uniffi * this is america * save * save * lets get ios to compile * save * save * save * save * trying to create reusable library * save * trying to pass ci * save progress * lint * install bindgen-cli * save * debug * fix action * use it * got ios to build again * got android build to work * update actions * get rid of lint errors * update version * revert UI changes * update readme and license * add cargo released version of the web-transport library * save * save * added template for ios and android and split sdk vs apps
1 parent 58b0e92 commit 7d32d68

File tree

83 files changed

+7110
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+7110
-5
lines changed

.github/workflows/mobile-build.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Mobile Build Check
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'videocall-ios/**'
7+
- 'videocall-sdk/**'
8+
- '.github/workflows/mobile-build.yml'
9+
push:
10+
tags:
11+
- 'videocall-sdk-*'
12+
13+
jobs:
14+
build-ios:
15+
name: Build iOS Library
16+
runs-on: macos-latest
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Install Rust
23+
uses: dtolnay/rust-toolchain@stable
24+
with:
25+
targets: aarch64-apple-ios,aarch64-apple-ios-sim,aarch64-apple-darwin
26+
27+
- name: Install cargo tools
28+
run: |
29+
cargo install cargo-lipo
30+
cargo install bindgen-cli --force --locked
31+
32+
- name: Build iOS library
33+
run: |
34+
cd videocall-sdk
35+
./build_ios.sh
36+
37+
- name: Check XCFramework
38+
run: |
39+
if [ ! -d "videocall-sdk/VideoCallKit/Frameworks/VideoCallIOS.xcframework" ]; then
40+
echo "XCFramework was not created successfully"
41+
exit 1
42+
fi
43+
44+
# Check the structure
45+
ls -la videocall-sdk/VideoCallKit/Frameworks/VideoCallIOS.xcframework
46+
ls -la videocall-sdk/VideoCallKit/Frameworks/VideoCallIOS.xcframework/ios-arm64
47+
ls -la videocall-sdk/VideoCallKit/Frameworks/VideoCallIOS.xcframework/ios-arm64/Headers
48+
49+
- name: Upload iOS artifacts
50+
if: startsWith(github.ref, 'refs/tags/videocall-sdk-')
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: ios-build
54+
path: |
55+
videocall-sdk/VideoCallKit/Frameworks/VideoCallIOS.xcframework
56+
videocall-sdk/VideoCallKit/Sources/VideoCallKit/videocall.swift
57+
58+
build-android:
59+
name: Build Android Library
60+
runs-on: macos-latest
61+
62+
steps:
63+
- name: Checkout repository
64+
uses: actions/checkout@v4
65+
66+
- name: Install Rust
67+
uses: dtolnay/rust-toolchain@stable
68+
with:
69+
targets: aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android
70+
71+
- name: Set up JDK
72+
uses: actions/setup-java@v3
73+
with:
74+
distribution: 'temurin'
75+
java-version: '17'
76+
77+
- name: Setup Android SDK
78+
uses: android-actions/setup-android@v3
79+
80+
- name: Install Android NDK
81+
run: |
82+
yes | sdkmanager --install "ndk;25.2.9519653"
83+
echo "ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/25.2.9519653" >> $GITHUB_ENV
84+
85+
- name: Build Android library
86+
run: |
87+
cd videocall-sdk
88+
./build_android.sh
89+
90+
- name: Check AAR and Kotlin bindings
91+
run: |
92+
if [ ! -f "videocall-sdk/target/videocall-sdk.aar" ]; then
93+
echo "AAR was not created successfully"
94+
exit 1
95+
fi
96+
97+
if [ ! -f "videocall-sdk/target/kotlin/com/videocall/uniffi/videocall.kt" ]; then
98+
echo "Kotlin bindings were not created successfully"
99+
exit 1
100+
fi
101+
102+
- name: Upload Android artifacts
103+
if: startsWith(github.ref, 'refs/tags/videocall-sdk-')
104+
uses: actions/upload-artifact@v4
105+
with:
106+
name: android-build
107+
path: |
108+
videocall-sdk/target/videocall-sdk.aar
109+
videocall-sdk/target/kotlin/com/videocall/uniffi/videocall.kt

.gitignore

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,57 @@
11
.DS_Store
2+
.cursor
3+
.vscode
24
.mov
35
.mp4
46
.env
57
target/
6-
helm/digital-ocean-secret
8+
helm/digital-ocean-secret
9+
10+
# iOS specific
11+
*.xcframework/
12+
*.framework/
13+
*.a
14+
*.xcworkspace/
15+
*.xcodeproj/*
16+
!*.xcodeproj/project.pbxproj
17+
!*.xcodeproj/xcshareddata/
18+
!*.xcodeproj/project.xcworkspace/
19+
!*.xcworkspace/contents.xcworkspacedata
20+
**/xcuserdata/
21+
*.xcuserstate
22+
*.moved-aside
23+
*.pbxuser
24+
!default.pbxuser
25+
*.mode1v3
26+
!default.mode1v3
27+
*.mode2v3
28+
!default.mode2v3
29+
*.perspectivev3
30+
!default.perspectivev3
31+
*.hmap
32+
*.ipa
33+
*.dSYM.zip
34+
*.dSYM
35+
36+
# CocoaPods
37+
Pods/
38+
*.xcworkspace
39+
40+
# Carthage
41+
Carthage/Build/
42+
43+
# Swift Package Manager
44+
.build/
45+
.swiftpm/
46+
47+
# macOS
48+
.AppleDouble
49+
.LSOverride
50+
._*
51+
.DocumentRevisions-V100
52+
.fseventsd
53+
.Spotlight-V100
54+
.TemporaryItems
55+
.Trashes
56+
.VolumeIcon.icns
57+
.com.apple.timemachine.donotpresent

.release-plz.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ changelog_update = false
4040
git_release_enable = false
4141
release = false
4242

43+
[[package]]
44+
name = "videocall-sdk"
45+
publish = false
46+
changelog_update = true
47+
git_release_enable = false
48+
49+
50+
4351

4452
[changelog]
4553
protect_breaking_commits = true

0 commit comments

Comments
 (0)