问题
How can I compile WebRTC iOS framework with Bitcode enabled. Currently I have to disable the Bitcode of my project due to WebRTC framework.
回答1:
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
回答2:
according to the official doc, you have to compile manually. More details there:
- main page: https://webrtc.org/native-code/development/
- iOS page: https://webrtc.org/native-code/ios/
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
来源:https://stackoverflow.com/questions/47376034/how-to-enable-bitcode-for-webrtc-ios-framework