I am working on a project that is accumulating more and more schemes and targets in our Xcode project. Other than re-ordering schemes and targets by hand is there anyway to automatically sort these alphabetically? Or do I have to put in a feature request for Apple?
2 Answers
This may not be the right way, but it is a way that worked for me. I could not find a way to do either of these things from within Xcode.
Schemes
Open the file [YourApp].xcodeproj/xcuserdata/[YourUsername].xcuserdata/xcschemes/xcschememanagement.plist
The "SchemeUserState" dictionary has entries for each scheme. In my file at least, they seem to be in alphabetical order. However, there is an integer key "orderHint" that seems to control the order in the scheme dropdown.
Targets
Open the file [YourApp].xcodeproj/project.pbxproj
Search for "PBXProject section".
That section has an entry for "targets", the order of which seems to control the order in Xcode.
I just renumbered and reordered mine. I did it while the project was closed - this may or may not be important.
-
I think you may have just saved me from going blind – jcpennypincher Sep 29 '15 at 18:40
I've achieved it by exporting all schemes, deleting them and then importing back.

- 431
- 1
- 5
- 10