How can I conditionally include a file based on build configuration in Xcode?

后端 未结 6 1728
时光取名叫无心
时光取名叫无心 2020-12-07 08:06

I have an Xcode project with a large number of targets where I would like to include a settings bundle for apps built under the Ad-hoc and Debug configurations, but not unde

6条回答
  •  情深已故
    2020-12-07 08:25

    I am no shell script expert but I think you need space between the square brackets and the condition. Also, quoting the variables may help:

    if [ "${CONFIGURATION}" = "Debug" ] then
        cp -r "${INPUT_FILE_PATH}" "${DERIVED_FILES_DIR}"/.
    fi
    

    As for the location, I use "$BUILT_PRODUCTS_DIR"/"$FULL_PRODUCT_NAME" for the root of my OS X app bundle.

提交回复
热议问题