IOS, building WebRTC from source with bitcode enabled

Borama Apps
Jan 14, 2021

Install depot_tools:

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=/path/to/fetched/depot_tools:$PATH

Build:

mkdir webrtc
cd webrtc
fetch --nohooks webrtc_ios
gclient sync
cd webrtc/src

Enable bitcode and specify architecutres needed.

tools_webrtc/ios/build_ios_libs.py --bitcode --arch arm64 x64 arm

Framework is inside:

webrtc/src/out_ios_libs/

Official docs:

How to strip unwanted architectures (when distributing to app store you need to strip x64 or i386).

That’s it!

--

--