3

I'm integrating WebRTC in a Xamarin.IOS app, and working through making the required C# bindings for the WebRTC library.

All of the info I've found on the web involves wrapping the Objective C framework with the help of Objective Sharpie, but the WebRTC iOS/MacOS framework seems to only be an Objective C wrapper around the internal C++ WebRTC library, so my question is:

Won't I be better off using P/Invoke around the native WebRTC C++ library and cutting the Objective C part out of it? Has anyone done this, and how?

I'll be doing an Android version of the app next. If I make a Xamarin Binding for the C++ lib, will I be able to use the same binding project for both iOS and Android versions of my app?

p10ben
  • 425
  • 1
  • 6
  • 17
  • Do you have a github repo? This repo may be helpful https://github.com/valentingrigorean/apprtc-ios-xamarin – user2801184 Jan 18 '19 at 00:19
  • Yes, I have a copy of that repo. It has a binding to the iOS framework only (incidentally, I can only get it working on a device and not the simulator), but not a Binding I can share between iOS and Android – p10ben Jan 18 '19 at 02:24
  • Great, I am not sure if you can share a single Binding with iOS & Android. Can you please share the working Bindings? – user2801184 Jan 18 '19 at 18:53
  • 1
    Have a look at this repo - https://github.com/Onotseike/Xamarin-WebRTC-Tutorial - There are some good progress being made there for making WebRTC work with Xamarin. And about using same binding for both android and iOS - No, you can't do that. You need the native library at the core of the binding dll to get it working in the respective OS. – Abhijith C R Nov 12 '20 at 03:23

0 Answers0