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

如果License Key异常(比如Bundle ID不匹配),在打包应用时将会看到如下弹出提示

这时如果选择继续打包,打包出的应用将无法正常使用,请根据窗体提示仔细检查并修复问题后再继续打包。
在一些特殊情况,如果你使用EasyAR的接口手动初始化,不使用Setttings文件中的License Key,你可以选择 Continue and don't warn me again
,或者关闭 Verify License When Build
选项,这将关闭打包时的检查。

Target Architecture¶
在 Player Settings 中修改 architecture 为 ARM64。
注意:不可使用Universal。

权限配置¶
你可以检查 EasyAR 所使用的权限。请确保你所使用的功能所使用的权限是打开的。这些选项用于检查 Usage Description 是否填写,并在必要时让编译失败。如果你需要在XCode中而不是Unity中设置 Usage Description ,可以关闭这些选项。

Camera Device
: 使用 CameraDevice 及其它需要使用相机设备的frame source需要的权限。启这个选项将会使用设备的相机权限。Video Recording
: 使用 VideoRecorder 需要的权限。开启这个选项将会使用设备的麦克风权限。Mega
: 使用 MegaTrackerFrameFilter 建议开启的权限。开启这个选项将会使用设备的定位权限(只有当com.easyar.mega package存在时才起作用)。
如果打开了 Camera Device
选项,需要添加 Camera Usage Description,否则构建将失败。

如果打开了 Video Recording
选项且需要使用VideoRecorder,需要添加 Camera Usage Description,如果没有添加构建不会失败。

如果打开了 Mega
选项,且com.easyar.mega package存在,需要添加 Location Usage Description,否则构建将失败。

录屏功能的特殊配置¶
注意: Unity 2020.2及更高版本 已经删除了OpenGLES支持,在这些版本中,录屏功能在iOS上将无法使用。
如果要使用录屏功能,需设置Graphics API 为OpenGLES3,并去掉Multithreaded Rendering的勾选。
