-
Xcode12把valid Architecture去掉了
需要在user-Defined的EXLUDED_ARCHS的dug下加上Any iOS Simulator SDK值是arm64 - 如果項目使用了cocoapods需要在項目的Podfile里面添加代碼段,然后執(zhí)行pod install
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end

pod install之前記得先把Podfile.lock文件刪掉。
也可以在項目的Podspec文件里面添加
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
由于我自己項目以前沒有創(chuàng)建Podspec文件,就直接在Podfile里面修改了

