webrtc icon indicating copy to clipboard operation
webrtc copied to clipboard

The version compiled on mac os always reports an error

Open obliviosn opened this issue 2 years ago • 7 comments

flutter_webrtc 80 issues x Undefined symbol:OBJC_CLASS$_RTCAudioTrack x Undefined symbol:OBJC_CLASS$RTCCVPixelBuffer x Undefined symbol: OBJC_CLASS$RTCCameraVideoCapturer x Undefined symbol:OBJC_CLASS$RTCConfigurationx Undefined symbol:OBJC_CLASS$RTCCryptoOptionsx Undefined symbol:OBJC_CLASS$RTCDataBuffer x Undefined symbol: OBJC_CLASS$RTCDataChannel x Undefined symbol: OBJC_CLASS$RTCDataChannelConfiguration Undefined symbol: OBJC_CLASS$RTCDefaultVideoDecoderFactory Undefined symbol: x OBJC_CLASS$RTCDefaultVideoEncoderFactory x Undefined symbol: OBJC_CLASS$ RTCDesktopMediaList x Undefined symbol:OBJC_CLASS$RTCFrameCryptor x Undefined symbol: OBJC_CLASS$RTCFrameCryptorKeyProvider Undefined symbol: x OBJC CLASS$ RTCH264ProfileLevelld xUndefined symbol:OBJC_CLASS$_RTCI420Buffer x Undefined symbol:OBJC_CLASS$_RTCIceCandidate x Undefined symbol:OBJC_CLASS$RTCIceServer x Undefined symbol: OBJC CLASS $ RTCMediaConstraints Undefined symbol: OBJC CLASS $RTCMediaStreamTrackx Undefined symbol:OBJC_CLASS$RTCPeerConnection Undefined symbol:OBJC CLASS$ RTCPeerConnectionFactory Undefined symbol: X OBJC_CLASS$_RTCPeerConnectionFactoryOptionsUndefined symbol: Uploading 微信图片_20231122115328.png…

obliviosn avatar Nov 22 '23 03:11 obliviosn

@hiroshihorie is this related to the prefixing work?

davidliu avatar Nov 22 '23 05:11 davidliu

It can be compiled into a framework normally, but the sdk used is in the development stage and an error like this occurs.

obliviosn avatar Nov 22 '23 06:11 obliviosn

Ok thanks for the information, I'll take a look.

hiroshihorie avatar Nov 22 '23 06:11 hiroshihorie

Ok thanks for the information, I'll take a look. any updates here?

JiaoLiu avatar Nov 27 '23 01:11 JiaoLiu

Only for macOS ? The code appears to be correct. I will make a non-prefixed build and try it out.

hiroshihorie avatar Nov 27 '23 10:11 hiroshihorie

I compiled for macOS without prefixing (default) and it works fine.

hiroshihorie avatar Nov 27 '23 10:11 hiroshihorie

I compiled for macOS without prefixing (default) and it works fine. ios is correct, but the same source code mac os has errors, Below is my compilation script。

gn gen out/macOS-x64 --args="target_os="mac" target_cpu="x64" is_debug=false rtc_include_tests=false rtc_use_h264=true ffmpeg_branding="Chrome" is_component_build=false use_rtti=true use_custom_libcxx=true treat_warnings_as_errors=false rtc_enable_protobuf=false rtc_build_examples=false " ninja -C out/macOS-x64 mac_framework_bundle

gn gen out/macOS-arm64 --args="target_os="mac" target_cpu="arm64" is_debug=false rtc_include_tests=false rtc_use_h264=true ffmpeg_branding="Chrome" is_component_build=false use_rtti=true use_custom_libcxx=true treat_warnings_as_errors=false rtc_enable_protobuf=false rtc_build_examples=false " ninja -C out/macOS-arm64 mac_framework_bundle

mkdir -p out/mac-x64-arm64-lib cp -R out/macOS-x64/WebRTC.framework out/mac-x64-arm64-lib/WebRTC.framework lipo -create -output out/mac-x64-arm64-lib/WebRTC.framework/WebRTC out/macOS-x64/WebRTC.framework/WebRTC out/macOS-arm64/WebRTC.framework/WebRTC

xcodebuild -create-xcframework
-framework out/mac-x64-arm64-lib/WebRTC.framework
-output out/WebRTC.xcframework cp LICENSE out/WebRTC.xcframework/

cd out/WebRTC.xcframework/macos-arm64_x86_64/WebRTC.framework/ mv WebRTC Versions/A/WebRTC ln -s Versions/Current/WebRTC WebRTC

obliviosn avatar Nov 30 '23 09:11 obliviosn