How to enable Bitcode for WebRTC iOS framework?

Viewed 4987

How can I compile WebRTC iOS framework with Bitcode enabled. Currently I have to disable the Bitcode of my project due to WebRTC framework.

2 Answers

You will need to build it yourself.
Something like:

# Clone the depot tools
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
# Add the tools to the path
export PATH=$PATH:"`pwd`/depot_tools"
# Download the WebRTC source code
mkdir webrtc_ios
cd webrtc_ios
# This will take some time
fetch --nohooks webrtc_ios
gclient sync
# Let's start building
cd src
# Build the framework, remove --arch "arm64 x64" to build ALL architectures, including 32 bit
tools_webrtc/ios/build_ios_libs.py --bitcode --arch arm64 x64
# The framework is at out_ios_libs/WebRTC.framework

Documentation: https://webrtc.github.io/webrtc-org/native-code/ios/

according to the official doc, you have to compile manually. More details there:

bottom of the page (last paragraph) includes instructions to build with bitcode support:

To build the framework with bitcode support, pass the --bitcode flag to the script like so

python build_ios_libs.py --bitcode

Related