如何在Xamarin(Forms)iOS项目中使用AirWatch SDK?
AirWatch SDK允许您在iOS应用程序中包含MDM功能。我按照VMWare网站上的说明进行操作 不幸的是,将NuGet包添加到我的iOS项目后,该项目无法编译,并抛出300多个此类编译错误如何在Xamarin(Forms)iOS项目中使用AirWatch SDK?,xamarin,xamarin.forms,xamarin.ios,airwatch,Xamarin,Xamarin.forms,Xamarin.ios,Airwatch,AirWatch SDK允许您在iOS应用程序中包含MDM功能。我按照VMWare网站上的说明进行操作 不幸的是,将NuGet包添加到我的iOS项目后,该项目无法编译,并抛出300多个此类编译错误 MTOUCH : error MT5211: Native linking failed, undefined Objective-C class: AWWebsiteFilteringPayload. 找不到符号“\u OBJC\u CLASS\u$\ u AWWebsiteFilteringP
MTOUCH : error MT5211: Native linking failed, undefined Objective-C class: AWWebsiteFilteringPayload.
找不到符号“\u OBJC\u CLASS\u$\ u AWWebsiteFilteringPayload”
在与应用程序链接的任何库或框架中。编译错误的原因是为其构建项目的平台(iPhone模拟器vs设备)和支持的体系结构 将构建选项更改为以实际设备为目标可以克服编译错误 如果您滚动浏览构建输出,您将看到如下内容
ld : warning : ignoring file /Path/To/Your/Project/MyApp.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-12.1/mtouch-cache/AWSDK.a, missing required architecture x86_64 in file /Path/To/Your/Project/MyApp.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-12.1/mtouch-cache/AWSDK.a (2 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_AWWebsiteFilteringPayload", referenced from:
-u command line option
Stackoverflow answer帮助发现.a文件中的目标体系结构
在终端窗口中输入
lipo -info /Path/To/AWSDK.a
返回
Architectures in the fat file: AWSDK.a are: armv7 arm64
现在右键单击iOS项目并打开选项窗口。导航到“iOS构建”部分。平台下拉列表显示“iPhone模拟器”。检查支持的体系结构下拉列表。您将看到AWSDK.a文件中不支持的i386、x86_64、i386+x86_64
将平台更改为iPhone,您将看到Armxx选项