98

I'm just starting to use Xcode 4, and I'm trying to find the file in a project where it stores all of a project's Schemes. I figured they would be stored in a file in the xcodeproj directory somewhere, but for the life of me I can't find which one.

All of my projects are stored on an SVN server, and I'd like to keep Scheme info with the project. Right now when you check out a project fresh, the Schemes don't make it along with.

EDIT: After playing with this a bit more, it appears that Schemes are stored each as separate files in xcuserdata/user.xcuserdata/xschemes/MyScheme.xscheme with a xcschememanagement.plist file to keep them all sorted.

So my new question, is there a way to store these in a per-project scope instead of a per-user scope? This way when another developer opens the same project, he'll see the same schemes I set up?

JOM
  • 8,139
  • 6
  • 78
  • 111
Cory Imdieke
  • 14,140
  • 8
  • 36
  • 46

1 Answers1

189

Finally found the answer on somebody's Twitter. Schemes are stored per user by default, but if you go to Manage Schemes and click the "Shared" checkbox on the far right for each one, they'll show up in the xcshareddata directory instead of your xcuserdata directory, where they'll be seen and used by everyone. Hopefully this will help someone else trying to figure out the same thing!

Cory Imdieke
  • 14,140
  • 8
  • 36
  • 46
  • 1
    The problem I have with that it I need to add one setting to the shared scheme, in my current case the default target for Test. I do not want all my other scheme setting to be forced on others. – zaph Sep 06 '11 at 18:29
  • Perfect! I've just been setting up our Xcode 4 workspaces and wanted to treat Schemes as a common configuration. – matt Nov 01 '11 at 21:18
  • In case you are working with a workspace, if you open it and manage the schemes, xcshareddata won't be created. Make sure sure to open each *project/s* in Xcode, and then manage its schemes. Buggy Xcode behaviour... – Danra Dec 06 '11 at 08:05
  • I just experienced the problem Dana pointed out and I was concluding that it is a bug in xcode's integration with svn. The problem it cause that I don't have "non-manual mode" solution for is that my command line script for automated build will fail to build an archive for the Apple Store. My solution is to open the project that I checked-out of svn in Xcode and exit Xcode (before I start modifying it and thinking I am working on my local project :) – mobibob May 08 '12 at 19:41
  • 7
    @Zaph No problem, just go to Product -> Manage Schemes... -> Select the shared scheme -> Click the Gear icon -> Duplicate -> Uncheck the "Shared" checkbox -> Rename if desired -> Click Edit... -> Make your changes to the scheme. They won't be picked up by people using the shared scheme. – funroll Sep 18 '12 at 13:59
  • 1
    @Cory +1 for finding this on Twitter... +2 if you can post the link to the tweet ;) – C. Tewalt Jul 19 '16 at 17:21