title: Cocoapod : Redefining preprocess macro using post install hook
body: <p>I want to update my pod to let users activating/desactivating a feature.</p>
  
  <p>To do this I've added a Preprocessor macro in my <code>podspec</code> :</p>
  
  <pre><code>s.xcconfig         = { 'GCC_PREPROCESSOR_DEFINITIONS' =&gt; 'FEATURE=1' }
  </code></pre>
  
  <p>Now, for a user the right thing to do (of what I've understood) should be to use a post install hook in the <code>podfile</code> to change the definition of <code>FEATURE</code></p>
  
  <pre><code>post_install do |installer_representation|
    installer_representation.project.targets.each do |target|
      if target.name == "Pods-MyPod"
        target.build_configurations.each do |config|
          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', 'FEATURE=0']
        end
      end
    end
  end
  </code></pre>
  
  <p>But it did not do anything at all ... <code>FEATURE</code> value is still 1</p>
  
  <p>Am I doing something wrong ?</p>
  
  <p>EDIT :
  I did take a look at this <a href="https://stackoverflow.com/questions/27133993/why-isnt-my-cocoapods-post-install-hook-updating-my-preprocessor-macros">answer</a>, but it did not help.</p>