iOS 工程配置¶
Bundle ID¶
设置iOS应用的Bundle ID, 注意Bundle ID要与创建License Key时填写的一致 。在Player Settings面板设置如下。

Target Architecture¶
在 Player Settings 中打开 IL2CPP 选项,并修改 architecture 为 Universal 或 arm64。

权限配置¶
添加Camera权限。可以在Unity Player Settings里设置如下

如果不在Unity中设置,也可以在后面生成的XCode工程中添加

生成XCode工程¶
点击Build Settings的Build按钮生成XCode工程。生成XCode工程之后仍需配置,因此不能在Unity中直接编译运行。

关闭 bitcode¶
EasyAR Sense不支持bitcode,Unity生成XCode工程后,需要在XCode Build Settings中关闭bitcode

添加framework¶
EasyAR Sense 的部分功能需要使用ARKit,需要在配置中添加ARKit Framework。


如果希望应用可以运行在不支持ARKit的系统版本上,可以在配置中将ARKit设为Optional(不同版本的XCode配置位置可能有所不同)

如果你在使用 Unity 2020.2 或更新版本,需要手动添加 OpenGLES Framework 或使用EasyAR Sense NR 发布包中的 iOS/arm64_fat_static/easyar.framework 文件替换 Assets/Plugins/iOS/easyar.framework。
录屏功能的特殊配置¶
如果要使用录屏功能,需设置Graphics API 为OpenGL ES 2.0

还需要添加Microphone权限,可以在Unity中添加

或在生成的XCode工程中添加
