Reputation: 1438
Using webrtc through the pod,
However, I cant enable bitcode in the project.
The solution requires building from source with bitcode enabled,
https://webrtc.googlesource.com/src/+/main/docs/native-code/ios/index.md
However, the following line python tools_webrtc/ios/build_ios_libs.py --bitcode
is generating error,
[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
Tried similar answers with no luck.
Upvotes: 5
Views: 905
Reputation: 845
I recently discovered this repository which provides Google WebRTC via Swift package manager:
https://swiftpack.co/package/stasel/WebRTC
This solved all my problems!
Binaries are also included for arm64 and x86.
I quote:
This repository contains unofficial distribution of WebRTC framework binaries for iOS and macOS.
Since version M80, Google has deprecated their mobile binary libraries distributions (Was officially using the GoogleWebRTC pod). To get the most up to date WebRTC library, you can compile it on your own, or you can use precompiled binaries from here or other sources.
📦 Releases
The binary releases correspond with official Chromium releases and branches as specified in the Chromium dashboard.
💡 Things to know
• All binaries in this repository are compiled from the official WebRTC source code without any modifications to the sources code or to the output binaries.
• Dynamic framework (xcframework format) which contains multiple binaries for both macOS and iOS.
• Bitcode is included and this is the reason for the larger file size.
Upvotes: 1