vvit
1/30/2015 - 10:25 AM

Podfile: Add Preprocessor Macro

Podfile: Add Preprocessor Macro

post_install do |installer_representation|
  installer_representation.project.targets.each do |target|
    if target.name == 'Pods-Mixpanel'
      target.build_configurations.each do |config|
        if config.name == 'Debug'
          puts "  Pods-Mixpanel #{config.name} before: #{config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'].inspect}"
          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'DISABLE_MIXPANEL_AB_DESIGNER=1'
          puts "  Pods-Mixpanel #{config.name} after:  #{config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'].inspect}"
        end
      end
    end
  end
end