今天在在用U3D打包成iOS的xcode工程时,遇到很多问题,整理一下,这里我用的是xcode8.3 unity5.3
1. xcode打开工程后发现没有适合的模拟器可以运行
系统提示说:
A build only device cannot be used to run this target.
please select an available device or choose a simulated device as the destination.
这里是因为unity在打包时,你在Player设置中设置了打包成在实体设备上运行,所以不支持模拟器。
只要在打包时,设置为simulator就可以在模拟器上运行了
2. 代码错误,提示有个符号无法识别
....../Libraries/libil2cpp/include/codegen/il2cpp-codegen.h:139:1: Unknown type name '__declspec'
定位到代码文件il2cpp-code

本文整理了使用Unity打包iOS应用时遇到的常见问题,包括xcode没有适配的模拟器、代码中遇到的`__declspec`未知类型名错误、设备指令集不支持以及实体iOS版本高于xcode支持的版本等问题,并提供了详细的解决方法。
最低0.47元/天 解锁文章
2367

被折叠的 条评论
为什么被折叠?



