通过 pod 使用 webrtc,
然而,我无法在项目中启用位码。
解决方案需要使用启用了位码的源代码进行构建。
然而,以下代码行https://webrtc.googlesource.com/src/+/main/docs/native-code/ios/index.md
python tools_webrtc/ios/build_ios_libs.py --bitcode
产生了错误。[7/3304] CC obj/third_party/libsrtp/libsrtp/srtp.o
FAILED: obj/third_party/libsrtp/libsrtp/srtp.o
...
clang: error: -mllvm is not supported with -fembed-bitcode
[6/3304] CC obj/third_party/libsrtp/libsrtp/ekt.o
FAILED: obj/third_party/libsrtp/libsrtp/ekt.o
...
clang: error: -mllvm is not supported with -fembed-bitcode
[9/3304] CC obj/third_party/libvpx/libvpx/bilinearpredict_neon.o
FAILED: obj/third_party/libvpx/libvpx/bilinearpredict_neon.o
....
clang: error: -mllvm is not supported with -fembed-bitcode
尝试了类似的答案,但没有成功。
bin % clang++ --version Apple clang version 13.0.0 (clang-1300.0.29.3) Target: x86_64-apple-darwin20.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
而在PATH中:% ./clang --version clang version 14.0.0 (https://github.com/llvm/llvm-project/ c4b45eeb44fdc49d1b6199f242082268f8c017d0) Target: x86_64-apple-darwin20.6.0 Thread model: posix InstalledDir: ...webrtc_ios/src/third_party/llvm-build/Release+Asserts/bin/.
- Tomer Petel-mllvm
标志来构建它,如此问题中所讨论的。我已经发布了一个启用位码的仅支持arm64的webrtc二进制框架cocoa pod,其二进制大小仅为7.5 MB。目前它对我来说运行良好,尽管我正在等待一个适当的修复。 - tanmoy