2
votes

I want to bind a native Obj C library into my Xamarin project. I tried follow this documentation :

https://developer.xamarin.com/guides/ios/advanced_topics/binding_objective-c/walkthrough/#Creating_A_Static_Library

So I created my .a fat library.

Now I want to bind the ApiDefinition with Objective Sharpie using this:

sharpie bind -scope=Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Foundation.framework/Headers -sdk=iphoneos11.2 /Users/xamarinprojects/Documents/CheckoutKit/CheckoutKit/*.h -output=/Users/xamarinprojects/Documents/CheckoutKit/Files -namespace= CheckoutKit

The problem is that I got an ApiDefinition file with 50k lines. In my library, I use Foundation, so I think Objective Sharpie binds all the headers Foundation files. I dont want that.

So I tried to use the sharpie bind -scope to remove file ? (is right ?) but it doesn't work. I still have a 50k lines in my ApiDefinition.

How can I resolve it ?

Thanks for helping

1

1 Answers

2
votes

Scope is only the directory with files you want to bind.

You should use /Users/xamarinprojects/Documents/CheckoutKit/CheckoutKit/*.h in the scope.