可可豆荚:两个不同的安装后片段

时间:2019-07-06 14:43:58

标签: cocoapods

我对可可豆完全陌生。到目前为止,我的podfile的结尾是这样的:

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            s = config.build_settings['GCC_PREPROCESSOR_DEFINITIONS']
            if s==nil then s = [ '$(inherited)' ] end
            s.push('MR_ENABLE_ACTIVE_RECORD_LOGGING=0');
            config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = s
        end
    end
end

现在我需要添加:

post_install do |installer_representation|
    installer_representation.pods_project.build_configurations.each do |config|
        config.build_settings['CLANG_ENABLE_MODULES'] = 'NO'
    end
end

但是由于我有两个post_install订单,所以两者都同时引发错误。如何将它们写成一个?

0 个答案:

没有答案
相关问题