更新到 WebRTC 的 XCFramework 后出现错误。这是它的手动说明:https ://swiftpackageregistry.com/alexpiezo/WebRTC
...missing required architecture armv7...
我不需要 Mac,所以我的步骤是这样的:
gn gen ./out/ios_arm64 --args='target_os="ios" target_cpu="arm64" is_component_build=false is_debug=false ios_deployment_target="10.0" rtc_libvpx_build_vp9=true use_goma=false ios_enable_code_signing=false enable_stripping=true enable_ios_bitcode=false'
gn gen out/ios_x64 --args='target_os="ios" target_cpu="x64" is_component_build=false is_debug=false ios_deployment_target="10.0" rtc_libvpx_build_vp9=true use_goma=false ios_enable_code_signing=false enable_stripping=true enable_ios_bitcode=false'
ninja -C out/ios_arm64 sdk:framework_objc
ninja -C out/ios_x64 sdk:framework_objc
xcodebuild -create-xcframework \
-framework ./out/ios_arm64/WebRTC.framework \
-framework ./out/ios_x64/WebRTC.framework \
-output ./out/WebRTC.xcframework
它适用于 iOS 模拟器和真实设备,但任何 iOS 设备(arm64、armv7)都不起作用。
Undefined symbol: _OBJC_CLASS_$_RTCMediaConstraints
Undefined symbol: _kRTCMediaStreamTrackKindVideo
Undefined symbol: _OBJC_CLASS_$_RTCAudioSessionConfiguration
Undefined symbol: _OBJC_CLASS_$_RTCAudioSession
Undefined symbol: _OBJC_CLASS_$_RTCIceCandidate
Undefined symbol: _OBJC_CLASS_$_RTCIceServer
Undefined symbol: _OBJC_CLASS_$_RTCConfiguration
Undefined symbol: _OBJC_CLASS_$_RTCCallbackLogger
Undefined symbol: _OBJC_CLASS_$_RTCPeerConnectionFactory
Undefined symbol: _OBJC_CLASS_$_RTCDispatcher
Undefined symbol: _OBJC_CLASS_$_RTCDefaultVideoDecoderFactory
Undefined symbol: _OBJC_CLASS_$_RTCSessionDescription
Undefined symbol: _RTCSetMinDebugLogLevel
Undefined symbol: _OBJC_CLASS_$_RTCRtpTransceiverInit
Undefined symbol: _OBJC_CLASS_$_RTCCameraVideoCapturer
Undefined symbol: _OBJC_METACLASS_$_RTCEAGLVideoView
Undefined symbol: _OBJC_CLASS_$_RTCDefaultVideoEncoderFactory
Undefined symbol: _OBJC_CLASS_$_RTCEAGLVideoView
有什么建议我应该怎么做才能克服它?