post_install do |installer|

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 11.0
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
      end
      if config.name == 'Test'
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)','TEST=1']
        config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = ['$(inherited)','TEST']
        config.build_settings['GCC_OPTIMIZATION_LEVEL'] = 0
        config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Onone'
      end
    end
  end
end

IPHONEOS_DEPLOYMENT_TARGET 库最低版本设置
GCC_PREPROCESSOR_DEFINITIONS 编译环境配置
SWIFT_ACTIVE_COMPILATION_CONDITIONS 编译环境配置

GCC_OPTIMIZATION_LEVEL oc编译优化级别
SWIFT_OPTIMIZATION_LEVEL swift编译级别优化

你可能感兴趣的:(post_install do |installer|)