1

I'm pretty new to forum and I really appreciate the passion that all of you use to solve the questions.

So I'm here because I'm struggling to integrate the GoogleWebRTC in my Xamarin Form project in the iOS part (I'm been able to make a native objC test app ), I've try to integrate it via CocoaPods with Sharpie Pod and bind it, but I'm not be able to resolve all the errors created in the bind on ApiDefinitions.cs.

After some time I found this project https://github.com/valentingrigorean/apprtc-ios-xamarin that has successfully bind the library and after some bug fix ( editing WebRTCBinding.csproj and remove the -lstdc++.6 linker and removed some errors in code) but when I try to add that binding library into my project and try to run return me :

Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: +[RTCPeerConnectionFactory initializeSSL]: unrecognized selector.

What am I doing wrong?

Thanks in advance.

BombezMan
  • 23
  • 1
  • 7
  • It's hard to know real reason with limited information. Try these solutions to to see if they help: [binding-objective-c-library](https://forums.xamarin.com/discussion/60402/app-crash-only-on-iphone-device-and-not-in-simulator-with-a-binding-objective-c-library) and [ios-binding](https://forums.xamarin.com/discussion/44514/ios-binding-works-fine-in-simulator-but-throws-exception-on-device) . You can also refer to this sample: [Xamarin.WebRTC](https://github.com/SuavePirate/Xamarin.WebRTC). – nevermore Mar 01 '19 at 05:51
  • hi @JackHua-MSFT thank for the reply! I try the solution you suggest but I cannot keep it work ( I've try to add -ObjC ) but nothing changed. The project you send me refers to FrozenMountain IceLink library but I need to implement it directly with google. What kind of information I have to share to make more clear the problem? – BombezMan Mar 01 '19 at 15:16

1 Answers1

1

I was also looking for a solution and spent a lot of time to get it running.
What I did and what helped me with the project you mentioned
- add both projects WebRTC and AppRTC into your project
- link from your project to this both projects
- Deleted lstdc++.6 as you did already
- Add both delegate IARDAppClientDelegate, IRTCEAGLVideoViewDelegate into
the class where you want to use it. You can add "RTCPeerConnectionFactory.InitializeSSL();" as test into for example ViewDidLoad and compile it for simulator and device.

Does it work or do you still get erros?

Maza
  • 86
  • 5
  • Hi, thanks for the suggestions. I've make it works in a test project but I have to insert also AVFoundation in the framework used. But I've another problem with the integration in the main project. He returns me the same error if I use also another library ( Skylink ) for webRTC. I think it's framework conflicts. You have encountered also problem like this? (Skylink integrated via sharpie pod) – BombezMan Mar 04 '19 at 15:34
  • to respect the timeline we decide to integrate 2 different webrtc library – BombezMan Mar 04 '19 at 15:48