Global Xcode run scripts

In order to automatically update build dates and build numbers, I set up a run script for the build phase in my scheme:

# Auto Increment Version Script
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

While this works, the downside is that the schemes are bound to the user-specific settings, i.e. they are are excluded from version control and may easily get lost.

  • buildbot: run svn with --trust-server-cert
  • why does git allow remote tags to move, or why you can't use git-tag for atomic test-and-set
  • svn deployment strategies for multiple groups of developers (not co-located) working on different components of the same project
  • Jenkins - How can i pass parameters from the Upstream to Downstream
  • Build sequencing when using distributed version control
  • How do I count the number of git commits affecting a given subtree?
  • What’s the proper way to tackle this problem and make those scripts available to all developers?

  • Git: untrack a file in local repo only and keep it in the remote repo
  • Remove all the commits/merges done from another branch
  • No releases in github when using git flow release
  • Recommended GIT gui client, able to work on a custom-mapped port repository
  • Reference directory from master branch on gh-pages branch
  • How to backup a local Git repository?
  • 2 Solutions collect form web for “Global Xcode run scripts”

    There is a “Shared” checkbox in the scheme settings. By checking it, your schemes will be saved in the project global settings and not in your user specific settings folder. This also makes it so that the scheme will be included in an git commit, etc (assuming that the project settings folders arent ignore in gitignore). You can keep “.xcuserdata” in .gitignore, and the scheme will still be included in your repo.

    enter image description here

    Tick the Shared box in the scheme settings (to save it into the project global settings).

    Git Baby is a git and github fan, let's start git clone.