1
votes

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.

1
It's hard to know real reason with limited information. Try these solutions to to see if they help: binding-objective-c-library and ios-binding . You can also refer to this sample: Xamarin.WebRTC. - Jack Hua
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

1 Answers

1
votes

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?