How can I compile WebRTC iOS framework with Bitcode enabled. Currently I have to disable the Bitcode of my project due to WebRTC framework.
Since the bitcode doesn't leave Apple's servers, enabling bitcode doesn't have any security implications at all (unless you consider Apple itself as an adversary in your threat model). iXGuard, our security solution for iOS applications and SDKs, requires a bitcode-enabled build.
Bitcode is an Apple technology that enables you to recompile your app to reduce its size. The recompilation happens when you upload your app to App Store Connect or export it for Ad Hoc, Development, or Enterprise distribution.
Including Bitcode is optional for iOS apps, but mandatory for watchOS or tvOS apps. "Meaning you can slice/segment it out for different processors, etc. once it's in the store, reducing the payload do the user accordingly."
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With