I have solved exactly the same problem by using Xcode Configuration Files in my parent project - typically your application.
These are the steps I took:
Create a Base Configuration file in Xcode via New > Other > Configuration File.
Write your base
xcconfig
file, mine looks a bit like this:/// Configure Search Paths HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/include" "$(BUILT_PRODUCTS_DIR)/usr/local/include" LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../Externals/Libraries/GoogleAnalytics" /// Linker flags OTHER_LDFLAGS=-ObjC -all_load
The thing to note here, is that
$(BUILT_PRODUCTS_DIR)
is the concatenation of:$(BUILD_DIR)/$(CONFIGURATION)-$(PLATFORM_NAME)
Write a specialised configuration for a custom configuration. I created an Ad Hoc configuration which duplicated Release, therefore my search paths now look like this:
#include "BaseConfig.xcconfig" /// Ad Hoc search paths HEADER_SEARCH_PATHS = "$(BUILD_DIR)/Release-$(PLATFORM_NAME)/include" "$(BUILD_DIR)/Release-$(PLATFORM_NAME)/usr/local/include" LIBRARY_SEARCH_PATHS = "$(BUILD_DIR)/Release-$(PLATFORM_NAME)" "$(SRCROOT)/../Externals/Sources/GoogleAnalytics"
Then in your application's project's Info tab select your configurations, to use the Base Configuration for Debug and Release, and then the special one for your custom configuration.