My Xcode project is setup in a way that has multiple configurations, allowing me to use the same code base for different variations of my app, but have unique elements in each such as app name, version, bundle identifier, icon, launch screen, etc. I've followed this website in order to do most of the setup: http://appfoundry.be/blog/2014/07/04/Xcode-Env-Configuration/
I also have a config.plist containing various unique settings associated with each Xcode configuration that successfully only gets copied upon being built. Here's a snippet of the Run Script build phase in order to do that:
RESOURCE_PATH=${SRCROOT}/${PRODUCT_NAME}/config/${CONFIGURATION}
BUILD_APP_DIR=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app
echo "Copying all files under ${RESOURCE_PATH} to ${BUILD_APP_DIR}"
cp -v "${RESOURCE_PATH}/"* "${BUILD_APP_DIR}/"
My next goal is to be able to copy a particular configuration's asset catalog when being built, so as to avoid bundling all of the different configuration's images into the build, causing it to become bloated. I've tried the same solution as above with the Run Script, changing the copy line to include the recursive option (since asset catalog is essentially a directory):
cp -rv "${RESOURCE_PATH}/"* "${BUILD_APP_DIR}/"
However, when I do this, my app fails to build and says it's unable to find the app icon and launch image. Any ideas?