如何为 WebRTC iOS 框架启用 Bitcode?

abh*_*dal 7 ios webrtc bitcode

如何在启用 Bitcode 的情况下编译 WebRTC iOS 框架。目前,由于 WebRTC 框架,我必须禁用我的项目的 Bitcode。

Mos*_*ieb 11

您将需要自己构建它。
就像是:

# 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
Run Code Online (Sandbox Code Playgroud)

  • 有人在运行“tools_webrtc/ios/build_ios_libs.py --bitcode --arch arm64 x64”时遇到此“clang++:错误:-mllvm 不支持 -fembed-bitcode”? (4认同)

Dr.*_*ard 6

根据官方文档,您必须手动编译。更多详情:

页面底部(最后一段)包括使用位码支持构建的说明:

要构建具有 bitcode 支持的框架,请将 --bitcode 标志传递给脚本,如下所示

python build_ios_libs.py --bitcode