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

后端 未结 6 1732
时光取名叫无心
时光取名叫无心 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条回答
  •  猫巷女王i
    2020-12-07 08:16

    Settings.bundle is always copied into destination area no matter whether Release or Debug configuration. So, maybe you need the following code:

    if [ ${CONFIGURATION} == "Release" ]; then
        rm -rf ${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Settings.bundle
    fi
    

提交回复
热议问题