I am trying to make bindings for the Vfr PDF reader: https://github.com/vfr/Reader This is an ObjectiveC application.
I followed the walkthrough from Xamarin there: http://docs.xamarin.com/guides/ios/advanced_topics/binding_objective-c/binding_walkthrough/
Unfortunately I am still struggling on one issue. In my AppDelegate I instantiate a ReaderDemoController, which comes from the Vfr Reader library but, when running on the device (an iPhone5), it keeps saying:
Wrapper type 'Hager.VfrReaderCoreBinding.ReaderDemoController' is missing its native ObjectiveC class 'ReaderDemoController'.
Which is strange since the Fat library contains i386, armv7, armv7s and arm64 libraries (done that using lipo). This is the LinkWith file content:
[assembly: LinkWith ("libVfrReaderCoreNative.a", LinkTarget.Simulator | LinkTarget.ArmV7 | LinkTarget.ArmV7s, ForceLoad = true)]
In the ApiDefinition file this is the ReaderController interface:
[BaseType (typeof (UIViewController))]
public interface ReaderDemoController {
}
Nothing really "complicated". Any idea of what could be the cause? This is the binding solution: solution zipped
This is also not working in the simulator. I get :
Could not create an native instance of the type 'Hager.VfrReaderCoreBinding.ReaderDemoController': the native class hasn't been loaded.
It is possible to ignore this condition by setting MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure to false.