Xamarin:使用iOS通用静态库的运行时和构建时错误

时间:2015-03-19 20:52:25

标签: ios xcode xamarin

我在目前的Xamarin项目中使用cocoapod SWRevealViewControllerXamarin .net binding。我使用XCode在本地创建了一个新的静态库,并添加了SWRevealViewController pod以构建arm64架构。我为模拟器(i386和x86_64)和设备(armv7和arm64)构建了新的库,并使用lipo将两个初始库组合成一个通用库。使用:"文件lib.a",我可以看到新的通用库包含所有四种体系结构。

当我用Xamarin项目中的新静态库替换原始库SWRevealViewControllerSDK.a时,我遇到两个问题:

o对于模拟器,我遇到运行时错误:

Unknown class SWRevealViewController in Interface Builder file.

o对于设备,我收到构建时错误:

MTOUCHTASK: error MT5211: Native linking failed, undefined Objective-C class: _OBJC_CLASS_$_SWRevealViewController. If '_OBJC_CLASS_$_SWRevealViewController' 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_$_SWRevealViewControllerSegue. If '_OBJC_CLASS_$_SWRevealViewControllerSegue' 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.

如果我不使用lipo制作通用库,只需为模拟器和设备添加两个初始静态库,一切正常,只需获取未用于目标体系结构的库的链接器警告。

任何人都知道为什么我使用通用库时会遇到问题,而使用两个初始库它可以正常工作?

0 个答案:

没有答案