本文介绍了如何防止在Release build v.s.中使用Settings.bundle。调试构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在我们的调试版本中设置一个settings.bundle,但不希望在我们的Release中。我该怎么做?
有没有一个runscript可以用来从复制捆绑资源构建阶段中删除?
解决方案
你可以写一个脚本来完全删除某个构建配置的设置包。对于目标,在构建设置下,有一个运行脚本的选项。这个脚本应该做你所需要的:
BUILD_APP_DIR = $ {BUILT_PRODUCTS_DIR} / $ {PRODUCT_NAME} .app
如果[$ CONFIGURATION==释放];然后
rm -Rf $ BUILD_APP_DIR / Settings.bundle
echo删除设置包
fi
shell字段可以读取/ bin / sh
I need to have a settings.bundle in our debug build, but don't want to have it in our Release.How do I approach this?Is there a runscript I can use to remove it from the copy bundle resources building phase?
解决方案
You can write a script to delete the setting bundle altogether for a certain build configuration. For the target, under "Build Settings", there is an option to run a script. This script should do what you need:
BUILD_APP_DIR=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app
if [ "$CONFIGURATION" == "Release" ]; then
rm -Rf $BUILD_APP_DIR/Settings.bundle
echo "Removed Settings Bundle"
fi
The "shell" field can read "/bin/sh"
这篇关于如何防止在Release build v.s.中使用Settings.bundle。调试构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!