How to enable Bitcode for WebRTC iOS framework?

一曲冷凌霜 提交于 2020-12-08 08:00:18

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!