美文网首页
building for iOS Simulator, but

building for iOS Simulator, but

作者: Mrfengzi | 来源:发表于2020-10-27 17:37 被阅读0次
    1. Xcode12把valid Architecture去掉了
      需要在user-Defined的EXLUDED_ARCHS的dug下加上Any iOS Simulator SDK值是arm64
    2. 如果项目使用了cocoapods需要在项目的Podfile里面添加代码段,然后执行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' }
    

    由于我自己项目以前没有创建Podspec文件,就直接在Podfile里面修改了

    相关文章

      网友评论

          本文标题:building for iOS Simulator, but

          本文链接:https://www.haomeiwen.com/subject/blbxvktx.html