slabko
11/15/2014 - 6:18 PM

[Cocoapods] Add preprocessor macros for pod project

[Cocoapods] Add preprocessor macros for pod project

platform :ios, '6.0'

pod 'ALibrary'

post_install do |installer_representation|
  installer_representation.project.targets.each do |target|
    if target.name == 'Pods-ALibrary'
      target.build_configurations.each do |config|
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'VERY_IMPORTANT_MACROS=1'
      end
    end
  end
end