Forum Xamarin.iOS

Problems binding library ATInternet to Xamarin IOS?

I'm having a trouble linking a Objective-C library to my Xamarin.iOS projects.

1: I made a "ApiDefinition" with sharpie
"sharpie bind --output=libATTracker --namespace=libATTracker --sdk=iphoneos9.1 /Users/design/Downloads/ATInternet_iOS_ObjC_SDK_2.2.3/ATTracker.h -scope ATInternet_iOS_ObjC_SDK_2.2.3/ "

2: I created the Bindable project attaching the ApiDefinition and Enums, and a "libATTracker.a" file.
[assembly: LinkWith("libATTracker.a", LinkTarget.Arm64 | LinkTarget.ArmV7 | LinkTarget.Simulator, SmartLink = true, ForceLoad = false, Frameworks= "SystemConfiguration")]

3: Add [Protocol] to ATTracker interface

4: The Bindable project is referenced from my Xamarin.iOS project, but this crash when I instance a ATTracker object.
** "ObjCRuntime.RuntimeException: Wrapper type 'libATTracker.ATTracker" is missing its native ObjectiveC class 'ATTracker'"**

Any one can help me?

I attached the example and library.

Thank you.

Sign In or Register to comment.