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.

  • Can I have a workspace that is both a git workspace and a svn workspace?
  • buildbot: run svn with --trust-server-cert
  • Jenkins - Dont build for specific commiter or commit message
  • How do I count the number of git commits affecting a given subtree?
  • How to configure a jenkins job to send mail if a SCM commit
  • Execute Maven plugin goal on parent module, but not on children
  • What’s the proper way to tackle this problem and make those scripts available to all developers?

  • Git: Diff does not handles character encoding other than UTF-8?
  • Automatically deploying assets to Rackspace CDN via git and updating references to those assets?
  • .gitignore not ignoring filenames with spaces in them on `git status`
  • Git pull from another repository without history
  • How do I manage git submodule subprojects in Eclipse?
  • Eclipse - Exclude root directory from 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.