无法在iOS上为arm64构建WebRTC

问题描述 投票:0回答:1

我正在尝试在 iOS 设备上构建 WebRTC.xcframework。

这是我正在运行的构建它的内容。

gn gen out/ios_arm64device --args='target_os="ios" target_cpu="arm64" ios_code_signing_identity="********" ios_code_signing_identity_description=""'

ninja -C out/ios_arm64device sdk:framework_objc

xcodebuild -create-xcframework -framework out/is_arm64device/WebRTC.framework -output out/arm64/WebRTC.xcframework

但是,将 WebRTC.xcframework 添加到我的项目后,当我尝试运行它时,出现以下错误:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_RTCPeerConnectionFactory", referenced from:
      objc-class-ref in RTIWebRTCClient.o
  "_OBJC_CLASS_$_RTCDefaultVideoDecoderFactory", referenced from:
      objc-class-ref in RTIWebRTCClient.o
  "_OBJC_CLASS_$_RTCDefaultVideoEncoderFactory", referenced from:
      objc-class-ref in RTIWebRTCClient.o
  "_RTCInitializeSSL", referenced from:
      -[RTIWebRTCClient configure] in RTIWebRTCClient.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

你能告诉我我错过了什么吗?

objective-c arm64 xcode12 webrtc-ios
1个回答
0
投票

rtc_enable_symbol_export=true
中添加参数
gn gen
并再次生成框架,它应该可以工作。

gn gen out/ios_arm64device --args='target_os="ios" target_cpu="arm64" ios_code_signing_identity="********" ios_code_signing_identity_description="" rtc_enable_symbol_export=true'
© www.soinside.com 2019 - 2024. All rights reserved.