iOS building for iOS Simulator, but linking in object file built for iOS XCode12模拟器编译第三方库失败

报错日志如下

building for iOS Simulator, but linking in object file built for iOS

今天升级了XCode12,发现模拟器编译报错:

iOS building for iOS Simulator, but linking in object file built for iOS XCode12模拟器编译第三方库失败_第1张图片

是linker链接器报了错:
building for iOS Simulator-arm64 but attempting to link with file built for iOS Simulator-x86_64
原来xcode12模拟器已经用arm架构来编译项目了,而link链接的还是x86架构

临时解决方法:
Target——Build Settings最下面有个VALID_ARCHS,这个VALID_ARCHS在xcode12中已经淘汰了,但有些cocoapod集成进来的三方库还是有这个key,比如这个极光认证:

iOS building for iOS Simulator, but linking in object file built for iOS XCode12模拟器编译第三方库失败_第2张图片

在项目Target——Build Settings里找到它

iOS building for iOS Simulator, but linking in object file built for iOS XCode12模拟器编译第三方库失败_第3张图片

加一个x86_64

iOS building for iOS Simulator, but linking in object file built for iOS XCode12模拟器编译第三方库失败_第4张图片

PS:直接把VALID_ARCHS的value删了也能编译成功,但是我这边运行会报没有权限访问项目.app文件的错

在VALID_ARCHS中加入了x86_64之后我这里就可以正常运行了

你可能感兴趣的:(nsdictionry,iOS混淆方案,iOS,ios,xcode,objective-c,flutter,swift)