2013-05-11 15 views
1

我爲Wikitude SDK框架創建的monotouch綁定在運行時不起作用。我按照以下說明創建了我的綁定:https://stackoverflow.com/a/13070064/42826無法加載維基單點觸控綁定

當我嘗試在運行時實例化我的包裝類,我得到以下異常:

包裝類型「Wikitude.WTArchitectView」缺少其天然 的ObjectiveC類的WTArchitectView「。

它看起來像本地類WTArchitectView那張沒有得到通過,該綁定組件在運行時加載。本地庫WikitudeSDK.a確實位於與ObjcBindingNativeLibrary構建操作的綁定程序集中。

這裏是我的LinkWith聲明(注意-ObjCWikitude機庫是required):

[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)] 

我的大部分ApiDefinition.cs的使用創建Objective Sharpie注:我只留下一個函數用於測試目的。

namespace Wikitude 
{ 
    [BaseType (typeof (UIView))] 
    interface WTArchitectView { 

     [Export ("initializeWithKey:motionManager:")] 
     void InitializeWithKey (string key, NSObject motionManager); 
    } 
} 

這裏是Wikitude SDK頭文件http://pastebin.com/HKBED11u

我的項目有的ARMv7 + ARMv7s支持的體系結構。

我是否必須強制加載本地庫,或者我只是錯過了明顯的東西來讓包裝工作?

回答

2

LinkWith屬性只提及ArmV7Simulator作爲LinkTarget s。如果您的設備是Armv7s,這可以解釋爲什麼它不起作用。

+0

謝謝。出於某種原因,只要我更改了支持的平臺,我開始看到鏈接錯誤與本機庫,這解釋了爲什麼它不會加載。我的測試手機是iPhone 4(Armv7)。 – Frederic 2013-05-11 11:28:33