发布
打开.xcodeproj 文件。
1️⃣在General 选项卡中找到Minimum Deployments 选择iOS版本。
2️⃣在Siging &Capabilities 选项卡中勾选Automatically manage signing 登录选择Team 并设置Bundle Identifier。
3️⃣设备选择Any iOS Device 后工具栏Product 选项卡下点击Archive 等待归档。
*如直接发布到设备上测试,连接设备后选择对应设备,点击左上角的▶️等待安装即可。
4️⃣归档完成后点击弹窗右侧的Distribute App 根据需要选择对应的发布方法(每种发布方法下方有对应说明可点击查看) 。
*此处根据需求选择Release Testing。
5️⃣点击Distribute 等待发布,发布成功后点击弹窗内Export 并选择导出路径进行导出。
问题
1️⃣Showing Recent Messages The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture.
在Build Settings 选项卡中查找Architectures 选择Standard Architectures 去除armv7。(有时设置了还是会出现该问题,可检查PROJECT 和TARGETS 是否所有都已进行设置。)
2️⃣Cannot initialize a parameter of type 'id<NSCopying> _Nonnull' with an rvalue of type 'Class'
在报错位置前添加强制类型转换。
例:[nativeSession->_classToCallbackMap setObject:anchorCallbacks forKey:[ARPlaneAnchor class]]; ➡️ [nativeSession->_classToCallbackMap setObject:anchorCallbacks forKey:(id)[ARPlaneAnchor class]];
3️⃣Command PhaseScriptExecution failed with a nonzero exit code
点击查看Local 输出找到报错的文件地址,打开终端输入Chmod a+x ➕ 文件地址。
4️⃣BITCODE 相关的错误可尝试在Build Settings 中查找ENABLE_BITCODE 并将其设置为NO。
5️⃣-mno-thumb 相关的错误可尝试在Build Settings 中查找Other C Flags 删除$(inherited) -mno-thumb。