Skip to content

Instantly share code, notes, and snippets.

@command-tab
Created September 1, 2020 21:23
Show Gist options
  • Save command-tab/0f1ecba25646eb9c153da7f93c09faa7 to your computer and use it in GitHub Desktop.
Save command-tab/0f1ecba25646eb9c153da7f93c09faa7 to your computer and use it in GitHub Desktop.
Building WebRTC.framework from master on macOS
cd webrtc_build
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=`pwd`/depot_tools:"$PATH"
fetch --nohooks webrtc_ios
gclient sync
git new-branch master-build

gn gen out/ios_sim --args='target_os="ios" target_cpu="x64" is_debug=false ios_enable_code_signing=false'
gn gen out/ios_64 --args='target_os="ios" target_cpu="arm64" is_debug=false ios_enable_code_signing=false'
gn gen out/ios_32 --args='target_os="ios" target_cpu="arm" is_debug=false ios_enable_code_signing=false'

ninja -C out/ios_sim AppRTCMobile
ninja -C out/ios_64 AppRTCMobile
ninja -C out/ios_32 AppRTCMobile

mkdir out/ios
cp -R out/ios_sim/WebRTC.framework/ out/ios/WebRTC.framework
cp -R out/ios_64/WebRTC.framework/ out/ios/WebRTC.framework
cp -R out/ios_32/WebRTC.framework/ out/ios/WebRTC.framework

lipo -create out/ios_64/WebRTC.framework/WebRTC out/ios_32/WebRTC.framework/WebRTC out/ios_sim/WebRTC.framework/WebRTC -output out/ios/WebRTC.framework/WebRTC

Yields out/ios/WebRTC.framework

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment