WebRtc integration on iOS

61 views
Skip to first unread message

alfredj...@gmail.com

unread,
Aug 9, 2017, 11:21:04 AM8/9/17
to discuss-webrtc
I have developed a prototype on iOS to stream custom images (not from a camera) with some minor modifications in WebRtc. This part is working as expected.

Now, I am trying to integrate this prototype with our Original product. The original product uses quite a few open-source libraries and is not using -ObjC linker flag. And I need -ObjC flag to get webrtc to work because otherwise I get "selector not recognized" runtime exceptions. Adding -ObjC posed a number of challenges. For starters, I got duplicate symbol _main issue from libSDL2 library. The only solution that I could think of was to strip the main() symbol out of this library. This lets me build the app but now I'm seeing runtime errors in jsonCpp library where conversion from JsonValue to jsonstring is crashing. If I remove -ObjC this works but as I said above I get those selector not recognized exceptions. jsonCpp is a pure c++ library, I don't understand how -ObjC can change it's behaviour though I am no expert on iOS or  Xcode.

I have already spent a week on the integration and at my wit's end. I am hoping that someone here must have come across these kind of issues. 
Am I missing some linker flag with -ObjC ? Any other suggestions ? 

Thanks,
AJ.

Rahul Pathak

unread,
Aug 14, 2017, 5:23:49 AM8/14/17
to discuss-webrtc

HI,

You got "selector not recognized" because of WebRTC uses Category in the project like "RTCAudioSession+Private.h" and "RTCAudioSession+Configuraion.mm".
So what you can do is you can remove the category files and write into RTCAudioSession or in some different files.
And build WebRTC again and try to run it.

it's work for me. 

Regards,
Rahul Pathak
Reply all
Reply to author
Forward
0 new messages