title: complex Xcode project with multiple .xcconfig files and cocoapods
body: <p>I am working on an iOS project where we are in the unfortunate situation that some of the libraries we must use comes in two versions. A version for debug, and a version for production.
  It is not possible to debug with the production lib. and it is likewise not possible to use the debug lib. in production.</p>
  
  <p>To solve this problem we have set up multiple targets (one for debugging and one for production) in the project. These targets use separate .xcconfig files (App-Debug.xcconfig and App-Production.xcconfig) to define the: LIBRARY_SEARCH_PATHS, HEADER_SEARCH_PATHS &amp; OTHER_LDFLAGS for each target. </p>
  
  <p>This all works just great, but it is becomming a pain to keep track of all our third party dependencies manually. 
  Hence we decided to start using CocoaPods to manage some of our third party dependencies.</p>
  
  <p>But the because of these "two version" libraries we can't use the Pods.xcconfig as intended, but need to append the settings from it to our own App-Debug.xcconfig and App-Production.xcconfig.</p>
  
  <p>I am not sure of the right way to do this, as everything I try, seems to not compile because my pods can't be found.</p>
  
  <p>Our Pods.xcconfig:</p>
  
  <pre><code>ALWAYS_SEARCH_USER_PATHS = YES
  HEADER_SEARCH_PATHS = ${PODS_HEADERS_SEARCH_PATHS}
  LIBRARY_SEARCH_PATHS = "$(PODS_ROOT)/TestFlightSDK"
  OTHER_LDFLAGS = -ObjC -lTestFlight -lz -framework SystemConfiguration -framework UIKit
  PODS_BUILD_HEADERS_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/AFNetworking" "${PODS_ROOT}/BuildHeaders/TestFlightSDK"
  PODS_HEADERS_SEARCH_PATHS = ${PODS_PUBLIC_HEADERS_SEARCH_PATHS}
  PODS_PUBLIC_HEADERS_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/AFNetworking" "${PODS_ROOT}/Headers/TestFlightSDK"
  PODS_ROOT = ${SRCROOT}/Pods
  </code></pre>
  
  <p>App-Debug.xcconfig:</p>
  
  <pre><code>#include "Config-XXX.xcconfig"
  #include "Config-Tesseract.xcconfig"
  #include "Config-AppMeasurement.xcconfig"
  #include "Config-Libxml2.xcconfig"
  #include "Config-Frameworks.xcconfig"
  
  LIBRARY_SEARCH_PATHS = $(inherited) $(XXX_LIBRARY_SEARCH_PATH_DEBUG) $(TESSERACT_LIBRARY_SEARCH_PATH) $(APPMEASUREMENT_LIBRARY_SEARCH_PATH)
  
  HEADER_SEARCH_PATHS = $(inherited) $(TESSERACT_HEADER_SEARCH_PATH) $(LIBXML2_HEADER_SEARCH_PATH) $(XXX_HEADER_SEARCH_PATH)
  
  OTHER_LDFLAGS = $(inherited) -lz -lxml2 -lstdc++ -all_load -ObjC -lXXXLibrary $(APPLE_FRAMEWORKS)
  </code></pre>
  
  <p>App-Production.xcconfig:</p>
  
  <pre><code>#include "Config-XXX.xcconfig"
  #include "Config-Tesseract.xcconfig"
  #include "Config-AppMeasurement.xcconfig"
  #include "Config-Libxml2.xcconfig"
  #include "Config-Frameworks.xcconfig"
  
  LIBRARY_SEARCH_PATHS = $(inherited) $(XXX_LIBRARY_SEARCH_PATH_PRODUCTION) $(TESSERACT_LIBRARY_SEARCH_PATH) $(APPMEASUREMENT_LIBRARY_SEARCH_PATH)
  
  HEADER_SEARCH_PATHS = $(inherited) $(TESSERACT_HEADER_SEARCH_PATH) $(LIBXML2_HEADER_SEARCH_PATH) $(XXX_HEADER_SEARCH_PATH)
  
  OTHER_LDFLAGS = $(inherited) -lz -lxml2 -lstdc++ -all_load -ObjC -lXXXLibrary $(APPLE_FRAMEWORKS)
  </code></pre>
  
  <p>Config-XXX.xcconfig:</p>
  
  <pre><code>XXX_LIBRARY_SEARCH_PATH_DEBUG = "$(SRCROOT)/External/XXX"
  XXX_LIBRARY_SEARCH_PATH_PRODUCTION = "$(SRCROOT)/External/XXX/LibProd"
  
  XXX_HEADER_SEARCH_PATH = "$(SRCROOT)/External/XXX/headers"
  </code></pre>
  
  <p>As we can see both the Pods.xcconfig and our own App-Debug.xcconfig sets the: LIBRARY_SEARCH_PATHS, HEADER_SEARCH_PATHS &amp; OTHER_LDFLAGS. </p>
  
  <p>What I need is to have the values declared in Pods.xcconfig appended to the values we declare in App-Debug.xcconfig.</p>
  
  <p>We are using Xcode 4.6 and building for iOS 4.3.</p>