I\'ve been going round and round for a couple days now trying to figure out why my post_install hook isn\'t producing the output I\'m expecting. Here\'s my Podfile:
Found the answer to my specific issue in the way I was adding macros. I had to break the config.build_settings ...
line into two lines like so:
post_install do |installer_representation|
installer_representation.project.targets.each do |target|
if target.name == 'Pods-SCCommon-UnitTests-SCCommon'
puts "Setting preprocessor macro for #{target.name}..."
target.build_configurations.each do |config|
puts "#{config} configuration..."
puts "before: #{config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'].inspect}"
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'SC_DEBUG_SCCOMMON'
puts "after: #{config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'].inspect}"
puts '---'
end
end
end
end
As a side note, I was also setting the definition on the wrong target. Now that both of those issues are resolved, I am officially unstuck! Yay!