mediasoup-ios-client icon indicating copy to clipboard operation
mediasoup-ios-client copied to clipboard

Console print both implemented error in mediasoup_client_ios.framework and WebRTC.framework

Open dkv587 opened this issue 3 years ago • 1 comments

objc[21932]: Class RTCEncodedImage is implemented in both /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/mediasoup_client_ios.framework/mediasoup_client_ios (0x10477b368) and /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/WebRTC.framework/WebRTC (0x103eebc38). One of the two will be used. Which one is undefined. objc[21932]: Class RTCRtpFragmentationHeader is implemented in both /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/mediasoup_client_ios.framework/mediasoup_client_ios (0x10477b3b8) and /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/WebRTC.framework/WebRTC (0x103eebc88). One of the two will be used. Which one is undefined. objc[21932]: Class RTCVideoCapturer is implemented in both /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/mediasoup_client_ios.framework/mediasoup_client_ios (0x10477b3e0) and /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/WebRTC.framework/WebRTC (0x103eebcb0). One of the two will be used. Which one is undefined. objc[21932]: Class RTCVideoCodecInfo is implemented in both /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/mediasoup_client_ios.framework/mediasoup_client_ios (0x10477b430) and /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/WebRTC.framework/WebRTC (0x103eebd00). One of the two will be used. Which one is undefined. objc[21932]: Class RTCVideoEncoderQpThresholds is implemented in both /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/mediasoup_client_ios.framework/mediasoup_client_ios (0x10477b480) and /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/WebRTC.framework/WebRTC (0x103eebd50). One of the two will be used. Which one is undefined. objc[21932]: Class RTCVideoEncoderSettings is implemented in both /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/mediasoup_client_ios.framework/mediasoup_client_ios (0x10477b4f8) and /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/WebRTC.framework/WebRTC (0x103eebdc8). One of the two will be used. Which one is undefined. objc[21932]: Class RTCVideoFrame is implemented in both /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/mediasoup_client_ios.framework/mediasoup_client_ios (0x10477b520) and /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/WebRTC.framework/WebRTC (0x103eebdf0). One of the two will be used. Which one is undefined. objc[21932]: Class RTCNativeAudioSessionDelegateAdapter is implemented in both /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/mediasoup_client_ios.framework/mediasoup_client_ios (0x10477b250) and /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/WebRTC.framework/WebRTC (0x103eece80). One of the two will be used. Which one is undefined. objc[21932]: Class RTCAudioSession is implemented in both /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/mediasoup_client_ios.framework/mediasoup_client_ios (0x10477b2a0) and /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/WebRTC.framework/WebRTC (0x103eeced0). One of the two will be used. Which one is undefined. objc[21932]: Class RTCAudioSessionConfiguration is implemented in both /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/mediasoup_client_ios.framework/mediasoup_client_ios (0x10477b2f0) and /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/WebRTC.framework/WebRTC (0x103eecf20). One of the two will be used. Which one is undefined. objc[21932]: Class RTCDispatcher is implemented in both /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/mediasoup_client_ios.framework/mediasoup_client_ios (0x10477b598) and /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/WebRTC.framework/WebRTC (0x103eecf98). One of the two will be used. Which one is undefined. objc[21932]: Class RTCCameraPreviewView is implemented in both /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/mediasoup_client_ios.framework/mediasoup_client_ios (0x10477b5c0) and /private/var/containers/Bundle/Application/D412AC82-6255-4987-828E-61F28CC501D7/aaaaaaaa.app/Frameworks/WebRTC.framework/WebRTC (0x103eecfc0). One of the two will be used. Which one is undefined.

dkv587 avatar Dec 17 '20 01:12 dkv587

libwebrtc.a and WebRTC.framework link too many common static lib. If app use both WebRTC.framework and mediasoup_ios_client.framework, app will both implement error.

To solve this problem, should no use two libs together.

When build mediasoup_ios_client.framework add libwebrt.a and some webrtc static lib in the webrtc build fold such as out_ios_libs/arm64_libs/obj/sdk/ into the mediasoup_ios_client project.

As follow image: image

Copy WebRTC.framework's Headers into mediasoup_ios_client project and make them public.

Modify the files which import <WebRTC/xxxx.h> to "xxxx.h"

Build Project.

Only import mediasoup_ios_client.framework to your App's project.

If you want using WebRTC.framework, you should add some libs contain WebRTC.framework undefined symbols. there're obj/meida/librtc_h264_profile_id.a obj/api/libcreate_peerconnection_factory.a obj/api/video_codecs/libbuiltin_video_decoder_factory.a and obj/api/video_codecs/libbuiltin_video_encoder_factory.a

But libcreate_peerconnection_factory.a libbuiltin_video_decoder_factory.a and libbuiltin_video_encoder_factory.a have some other dependencies. I dont know how to add these dependencies.

RiuHDuo avatar Mar 25 '22 07:03 RiuHDuo