The best solution
- Modify Info.plist , set
CFBundleDisplayName to a variable named $(MY_DISPLAY_NAME)

- Open the project’s or target's <Settings> tab , add a key named
MY_DISPLAY_NAME in the Custom section (you need to scroll down to find this section), and then simply expand the newly added key and specify any name for each configuration, as you wish.

When creating a project, each variable in Info.plist will be replaced with its value.
The solution is much simpler than the original.
Original solution
I had the same requirement in my project, and then I found your question, and finally I solved it. Edit the project diagram , add a preliminary action and aftereffect script to make the changes. Like this,
Step 1. Change the application name in the Pre-actions assembly
str="" if [ "${CONFIGURATION}" == "Debug" ];then str="dev" elif [ "${CONFIGURATION}" == "AdhocDevelopment" ];then str="dev" elif [ "${CONFIGURATION}" == "AdhocDistribution" ];then str="adhoc" elif [ "${CONFIGURATION}" == "DailyBuild" ];then str="rdm" fi perl -pi -e "s/appName[^<]*/appName${str}/g" ${PROJECT_DIR}/smd/Info.plist

Step 2. Restore the application name in Building Deliveries
perl -pi -e "s/appName[^<]*/appName/g" ${PROJECT_DIR}/smd/Info.plist echo ${PROJECT_DIR}/${INFOPLIST_FILE} > ~/tmp.txt; rm -f ~/tmp.txt
Something to explain: Debug / AdhocDevelopment / AdhocDistribution / DailyBuild - these are the configuration names of your projects; $ {CONFIGURATION} is predefined by Xcode; perl is preferred over awk and sed, which are all pre-installed on every Mac OS X.
By the way, what I did was change appName in Info.plist, you can change your infoplist.strings. Thus, you only need one Info.plist file.
Dawn song
source share