Pod Architectures环境配置

2020-08-27  本文已影响0人  大冰子gg

在podfile中加入以下代码

post_install do |installer_representation|
    installer_representation.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['ARCHS'] = 'arm64 arm64e'
            config.build_settings['VALID_ARCHS'] = 'arm64 arm64e'
            if config.name == 'Debug'
              config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
              else
              config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
              end
        end
    end
end

更新:xcode12之后这种设置貌似会导致模拟器编译报错

上一篇 下一篇

猜你喜欢

热点阅读