Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swarm-cloud/apple-webrtc
WebRTC framework for ios, macOS and tvOS
https://github.com/swarm-cloud/apple-webrtc
Last synced: about 2 months ago
JSON representation
WebRTC framework for ios, macOS and tvOS
- Host: GitHub
- URL: https://github.com/swarm-cloud/apple-webrtc
- Owner: swarm-cloud
- License: mit
- Created: 2021-05-10T10:01:22.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-18T17:05:43.000Z (almost 3 years ago)
- Last Synced: 2023-08-06T22:51:32.423Z (over 1 year ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Apple WebRTC
## Sync official repo
Follow official [WebRTC iOS development](https://webrtc.googlesource.com/src/+/refs/heads/master/docs/native-code/ios/index.md) guide to sync official repo.
Note: all commands are executed on Python 2.x shell.
## Build stripped version of WebRTC for iOS and tvOS
Change directory into `src`, run:
```bash
git remote add cdnbye https://github.com/cdnbye/DataChannel.git
git fetch cdnbye
git checkout dc_only_ios
```Then change directory into parent of `src`, run `gclient sync`.
Put `tvosify-os.sh` and `tvosify-sim.sh` in parent of `src`, then run:
```bash
cd src && \
python tools_webrtc/ios/build_ios_libs.py --bitcode --arch arm64 x64 -o out/iphone_libs/ && \
gn gen out/tvos_arm64 --args='target_os = "ios" target_cpu = "arm64" ios_enable_code_signing = false use_xcode_clang = true is_component_build = false is_debug = false ios_deployment_target = "10.0" rtc_libvpx_build_vp9 = false enable_ios_bitcode = true use_goma = false enable_dsyms = true enable_stripping = true' && \
../tvosify-os.sh ./out/tvos_arm64 && \
ninja -C out/tvos_arm64 framework_objc && \
gn gen out/tvos_x64 --args='target_os = "ios" target_cpu = "x64" ios_enable_code_signing = false use_xcode_clang = true is_component_build = false is_debug = false ios_deployment_target = "10.0" rtc_libvpx_build_vp9 = false enable_ios_bitcode = true use_goma = false enable_dsyms = true enable_stripping = true' && \
../tvosify-sim.sh ./out/tvos_x64 && \
ninja -C out/tvos_x64 framework_objc
```## Build original version of WebRTC for macOS
Change directory into `src`, run:
```bash
git checkout cdnbye-mac
```Then change directory into parent of `src`, run `gclient sync`.
Then run:
```bash
cd src && \
gn gen out/mac_x64 --args='target_os = "mac" target_cpu = "x64" is_component_build = false is_debug = false use_goma = false enable_dsyms = true enable_stripping = true' && \
ninja -C out/mac_x64 mac_framework_objc && \
gn gen out/mac_arm64 --args='target_os = "mac" target_cpu = "arm64" is_component_build = false is_debug = false use_goma = false enable_dsyms = true enable_stripping = true' && \
ninja -C out/mac_arm64 mac_framework_objc && \
lipo -create out/mac_x64/WebRTC.framework/WebRTC out/mac_arm64/WebRTC.framework/WebRTC -output out/WebRTC-mac-fat
```Note: since the stripped version is a little bit old, which doesn't support build for macOS arm64, so macOS uses a different version, so to macOS version after iOS/tvOS version, or vice-versa, you need to checkout branch and run `gclient sync` again.
## Create xcframework
In directory `src`, run:
```bash
rm -rf out/WebRTC.xcframeworkxcodebuild -create-xcframework \
-framework out/iphone_libs/arm64_libs/WebRTC.framework \
-framework out/iphone_libs/x64_libs/WebRTC.framework \
-framework out/tvos_arm64/WebRTC.framework \
-framework out/tvos_x64/WebRTC.framework \
-framework out/mac_fat/WebRTC.framework \
-output out/WebRTC.xcframework
```