Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I sort the schemes and targets list alphabetically in Xcode?

Tags:

xcode

ios

target

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?

like image 962
jcpennypincher Avatar asked Mar 18 '14 19:03

jcpennypincher


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.

like image 168
David Avatar answered Oct 18 '22 02:10

David


I've achieved it by exporting all schemes, deleting them and then importing back.

like image 44
Pikacz Avatar answered Oct 18 '22 02:10

Pikacz