Global Xcode Launch Scripts

To automatically update build dates and build numbers, I configured the script to run for the build phase in my circuit:

# Auto Increment Version Script buildPlist=${PROJECT_DIR}/${INFOPLIST_FILE} CFBuildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBuildNumber" $buildPlist) CFBuildNumber=$(($CFBuildNumber + 1)) /usr/libexec/PlistBuddy -c "Set :CFBuildNumber $CFBuildNumber" $buildPlist # "Mon" is a hack, but day is needed, and in English CFBuildDate=$(date "+Mon %b %d %H:%M:%S %Z %Y") /usr/libexec/PlistBuddy -c "Set :CFBuildDate $CFBuildDate" $buildPlist 

Although this works, the disadvantage is that the schemes are tied to user settings, that is, they are excluded from version control and can easily be lost.

What is the right way to solve this problem and make these scripts available to all developers?

+4
source share
2 answers

In the scheme settings, the "General" checkbox is selected. By checking this, your schemes will be saved in the global settings of the project, and not in your specific user's settings folder. It also makes the circuit be included in git commit, etc. (Provided that the project settings patches arent ignored in gitignore). You can save the ".xcuserdata" to .gitignore, and this scheme will still be included in your repo.
Screenshot:

enter image description here

+2
source

Mark the general section in the scheme settings (to save it in the global settings of the project).

0
source

Source: https://habr.com/ru/post/1383115/


All Articles