AgoraIO-Community / Agora-RTC-SDK-for-Xamarin

MIT License
31 stars 9 forks source link

Unable to reference Native References when creating iOS bindings for Agora iOS Sdk #14

Closed VictorK1902 closed 4 years ago

VictorK1902 commented 4 years ago

I believe the latest version 3.0.1.3-beta2 of Xamarin.Agora.Full.iOS cannot compile for simulator so I'm trying to create a native binding for the full architecture version of the sdk as listed here: Agora Start a Video Call. That way I can build and debug my app on simulator, since other developers in the team need to work on and debug other areas of the app.

My plan is to create 2 different versions: one that supports all architecture and one that's app store ready so that I can swap the dll and build to release when the time comes.

I followed the instructions listed here https://github.com/AgoraIO-Community/Agora-RTC-SDK-for-Xamarin/tree/master/Xamarin.Agora.iOS and also other sharpie docs but got stuck at adding native reference. I wonder if someone could help me if I'm missing anything. Here's the steps I tried:

  1. Download the sdk and unzip: https://download.agora.io/sdk/release/Agora_Native_SDK_for_iOS_v3_0_1_1_FULL.zip?_ga=2.134487925.549327924.1594424861-931662975.1594424861

  2. Navigate to Agora_Native_SDK_for_iOS_FULL\libs\ALL_ARCHITECTURE

  3. Run sharpie command:

    sharpie bind -output Binding -framework ./AgoraRtcKit.framework -sdk iphoneos13.5
  4. Navigate to Binding and open ApiDefinitions.cs (about 2500 lines)

  5. Remove all the Verify tags.

  6. Create new iOS Binding library.

  7. Copy the content of Binding\ApiDefinitions.cs and Binding\StructsAndEnums.cs to ApiDefinition.cs and Structs.cs

  8. Add Native Reference -> select Agora_Native_SDK_for_iOS_FULL\libs\ALL_ARCHITECTURE\AgoraRtcKit.framework and click open.

  9. The compiler doesn't recognize 'AgoraRtcKit' even though it's been added.

alt text

alt text

VictorK1902 commented 4 years ago

I answered my own question here ... https://forums.xamarin.com/discussion/183587/unable-to-reference-native-framework