iOS webrtc 框架的位码启用。错误:-fembed-bitcode 不支持 -mllvm

Muh*_*moy 5 ios webrtc bitcode

通过 pod 使用 webrtc,

https://cocoapods.org/pods/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

Run Code Online (Sandbox Code Playgroud)

尝试过类似的答案但没有运气。

Dan*_*lia 1

我最近发现了这个存储库,它通过 Swift 包管理器提供 Google WebRTC:

\n

https://swiftpack.co/package/stasel/WebRTC

\n

这解决了我所有的问题!

\n

还包含适用于 arm64 和 x86 的二进制文件。

\n

我引用:

\n
\n

该存储库包含适用于 iOS 和 macOS 的 WebRTC 框架二进制文件的非官方发行版。

\n

自 M80 版本以来,Google 已弃用其移动二进制库发行版(正式使用 GoogleWebRTC pod)。要获取最新的 WebRTC 库,您可以自行编译它,也可以使用此处或其他来源的预编译二进制文件。

\n

发布

\n

二进制版本与 Chromium 仪表板中指定的官方 Chromium 版本和分支相对应。

\n

要知道的事情

\n

\xe2\x80\xa2 此存储库中的所有二进制文件都是从官方 WebRTC 源代码编译而来,不对源代码或输出二进制文件进行任何修改。

\n

\xe2\x80\xa2 动态框架(xcframework 格式),其中包含适用于 macOS 和 iOS 的多个二进制文件。

\n

\xe2\x80\xa2包含位码,这就是文件大小较大的原因。

\n
\n

  • 目前正在修复此问题并添加对 x86 的支持。任何关于上传到应用商店时失败的原因的见解?“arm64_x86_64”二进制文件接近 16.8 Mb。 (3认同)
  • 这是 App Store Connect 向我报告的问题:“ITMS-90338:非公共 API 使用 - 应用程序引用 [MY_APP_NAME] 中的非公共选择器:initWithURLStrings:、sdp、setIsEnabled:、setVideoContentMode:、videoSource。如果源代码中的方法名称与上面列出的私有 Apple API 相匹配,更改您的方法名称将有助于防止此应用程序在将来的提交中被标记。此外,请注意,上述一个或多个 API 可能位于静态库中包含在您的应用程序中。如果是这样,则必须将其删除。” (2认同)