ios开发xcode问题解决集锦
在开发ios app的过程中,xcode经常搞出各种问题,在这里记录下问题和解决措施。
问题一:The app ID cannot be registered to your development team
导入github新下载的项目时,提示如下错误:
The app ID "com.myDomain.myApp" cannot be registered to your development team. Change your bundle identifier to a unique string to try again. |

百思不得其解,最后发现将Bundle id修改下就行。
问题二:line 132: ARCHS[@]: unbound variable
在在Target-Build Settings-Excluded Architectures中进行如下设置:

参考链接: https://stackoverflow.com/questions/64474801/archs-unbound-variable-in-xcode-12
问题三:xcode SDK does not contain ‘libarclite‘
SDK does not contain 'libarclite' at the path '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a'; try increasing the minimum deployment target |
解决方法
Pods–TARGETS 设置iOS11.2以上版本即可。
问题四:Building for ‘iOS-simulator’, but linking in object file (/***/Pods/Bugly/Bugly.framework/Bugly[arm64]2) built for ‘iOS’
在 Apple 的 M 系列芯片的电脑上运行代码的时候,如果应用运行尚不支持 arm64 体系结构的旧插件,通常会报这个错:
building for iOS Simulator, but linking in object file built for iOS, xxx for architecture arm64
临时解决这个问题的办法是打开 Rosetta 环境,打开 Xcode 所在目录,鼠标右键,显示简介,这里有个使用 Rosetta 打开的选项,勾选之后重启 Xcode 即可。
当升级到 Xcode 14.3,发现显示简介中的这个选项没有了:
当大家以为苹果要强制废弃对老架构的支持时,发现 Xcode 只是换了另一种方式管理这个选项而已。
要在 Rosetta 模拟器上运行应用程序,你需要执行以下操作。
转到菜单栏中的“Product”菜单,然后选择 Destination > Destination Architectures > Show Rosetta Destinations 或者 Show All Destinations 。
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 叶落花开的博客!
评论