I am trying to bind my swift framework with Xamarin. I am using objective Sharpie for this.
- I have set 'Enable Bitcode' to 'No' in the framework.
- Built the framework for running.
- Use the following command for binding the header file.
sharpie bind -sdk iphoneos11.1 MyFramework.framework/Headers/MyFramework-Swift.h -output=MyFrameworkCS -namespace=MyFramework
I got the APIDefinitions.cs file but its more than 79 thousand lines and has lots of errors. The StructsAndEnums.cs file is huge as well.
My framework(and the .h file) has import statements for only UIKit, AVFoundation and Foundation. But the APIDefinitions.cs has this.
using System;
using AVFoundation;
using AudioToolbox;
using AudioUnit;
using CloudKit;
using CoreAnimation;
using CoreAudio;
using CoreData;
using CoreFoundation;
using CoreGraphics;
using CoreImage;
using CoreLocation;
using CoreMIDI;
using CoreMedia;
using CoreMidi;
using CoreText;
using CoreVideo;
using Darwin;
using Dispatch;
using FileProvider;
using Foundation;
using HyperSecureSDK;
using IOSurface;
using ImageIO;
using Intents;
using MediaToolbox;
using Metal;
using ObjCRuntime;
using ObjectiveC;
using OpenGLES;
using Security;
using UIKit;
using simd;
I am very new to Xamarin and super stuck here. Any help would be greatly appreciated!