building for iOS Simulator, but linking in object file built for iOS, file '/Users/XX/Desktop/tes
The linked framework ‘*.framework’ is missing one or more architectures required by t…
M1的电脑运行时,会报上面两个错误
解决方法:
1. 如下图,设置一下Excluded Architectures,箭头处为:
building for iOS Simulator, but linking in object file built for iOS, file 'xxx/Pods/WechatOpenSDK/WeChatSDK1.8.5/libWeChatSDK.a' for architecture arm64
后面发现设置Excluded Architectures后真机运行报错,我就把这些设置删除了,模拟器也可以运行成功,真假运行遇到的问题参见我的博客:xxx/Pods/Target Support Files/Pods-xxx/Pods-xxx-frameworks.sh: line 121: ARCHS[@]: unbound variable
2.在podfile添加
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end
运行一下pod install
3.如果编译还是报错,clear一下项目
参考博客:
1.building for iOS Simulator, but linking in object file built for iOS - 简书
2.The linked framework ‘’ is missing one or more architectures required by this ta - 简书