The monotouch binding that I created for the Wikitude SDK framework does not work at run time. I created my binding by following these instructions: https://stackoverflow.com/a/13070064/42826.
When I try to instantiate my wrapper class at run-time, I get the following exception:
Wrapper type 'Wikitude.WTArchitectView' is missing its native ObjectiveC class 'WTArchitectView'.
It looks like the native class WTArchitectView goes not get loaded by the binding assembly at run-time. The native library WikitudeSDK.a is indeed located in the binding assembly with the ObjcBindingNativeLibrary build action.
Here is my LinkWith declaration (notice the -ObjC that is required by the Wikitude native library):
[assembly: LinkWith ("WikitudeSDK.a", LinkTarget.ArmV7 | LinkTarget.Simulator, Frameworks = "CoreVideo Security SystemConfiguration CoreMedia AVFoundation CFNetwork CoreLocation CoreMotion MediaPlayer OpenGLES QuartzCore CoreGraphics", ForceLoad = true, LinkerFlags = "-ObjC", IsCxx = true)]
Most of my ApiDefinition.cs was created using Objective Sharpie. Note: I only left a single function for testing purposes.
namespace Wikitude
{
[BaseType (typeof (UIView))]
interface WTArchitectView {
[Export ("initializeWithKey:motionManager:")]
void InitializeWithKey (string key, NSObject motionManager);
}
}
Here is the Wikitude SDK header file: http://pastebin.com/HKBED11u
My project has the ARMv7 + ARMv7s supported architectures.
Do I have to force loading the native library somehow or did I simply miss something obvious to get the wrapper to work?