【问题标题】:Xamarin binding broken after updating Xamarin.iOS & unified API更新 Xamarin.iOS 和统一 API 后 Xamarin 绑定中断
【发布时间】:2015-05-13 14:28:05
【问题描述】:

我已升级我的 Xamarin 项目并绑定到更新版本的 Xamarin.iOS 并转换为统一 API。由于这样做我创建的绑定之一导致我的应用程序构建失败并出现错误:

MTOUCHTASK: error MT5211: Native linking failed, undefined Objective-C class: _OBJC_CLASS_$_EAAccessoryManager. If '_OBJC_CLASS_$_EAAccessoryManager' is a protocol from a third-party binding, please check that it has the [Protocol] attribute in its api definition file, otherwise verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
    MTOUCHTASK: error MT5211: Native linking failed, undefined Objective-C class: _OBJC_CLASS_$_EASession. If '_OBJC_CLASS_$_EASession' is a protocol from a third-party binding, please check that it has the [Protocol] attribute in its api definition file, otherwise verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
    MTOUCHTASK: error MT5202: Native linking failed. Please review the build log.

我在绑定中附加的框架确实引用了 EAAccessoryManager 和 EASession,但是我没有在我的 ApiDefinition 中引用这些,因为我不需要或使用这部分功能。以前正常工作时,是什么导致我的绑定中断?

【问题讨论】:

    标签: ios xamarin.ios xamarin


    【解决方案1】:

    如果你的框架引用了 ExternalAccessory 框架,LinkWith 属性需要这样说:

    [assembly: LinkWith (..., Frameworks = "ExternalAccessory", ...)]
    

    恕我直言,问题不在于它为什么在统一 API 中工作,而是它以前是如何工作的,因为这以前也应该是一个链接错误(除非您更改了主项目中的其他构建选项)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多