In Xcode 3.x I could do Edit > Sort > By Name. I cannot find this functionality in the new version of Xcode. How do I accomplish this?
5 Answers
This is a missing feature (a major one, IMO) from Xcode 4.
EDIT: As of 4.2 it's back in!!!

- 16,482
- 7
- 61
- 77
-
1
-
18
-
2It's really freaking annoying. It needs an option to keep them in alphabetical order too. – Beardo Mar 11 '11 at 20:13
-
Time to file a bug on this. I used this feature all the time in Xcode 3. :-/ – memmons Mar 24 '11 at 20:34
-
4Yes, this is pathetic. It was pretty insufferable that in Xcode 3 you had to continually trigger a sort by hand, in every file group, over and over. Now you can't do it at all? WTF? – Oscar Mar 30 '11 at 10:16
-
2Unreal. Seems like the most basic thing a file manager should do! – typeoneerror Apr 11 '11 at 21:26
-
Grrrrrr. Thanks google & stack overflow for putting my annoyance to rest, albeit in the undesired mode. – david van brink Apr 29 '11 at 16:03
It IS there in Xcode 4.2 (not sure about earlier versions though.)
y http://f.cl.ly/items/1m0r0y190y0D2w2t3t1D/Screen%20Shot%202555-01-04%20at%2012.16.31%20.png

- 61,017
- 25
- 133
- 162
From my previous answer :
This was, sadly, left out of Xcode4 -- I loved that feature. You can fix it though. Here's how:
First, jump over to Apple's Bug Reporter and file a feature request. Seriously, go ahead. I'll wait until you are back.
Back? Great! We are one step closer to getting that feature. Nice job!
Now for the poor man's substitute until Apple fixes it: Re-organize your project so most of your files sit in sub-directories (real ones, not Xcode logical "group" folders). Typically I have my files arranged in Classes, Controllers, Resources, Images, Foundation, and Supporting files. This covers about 95% of all my files. Whenever you need to reorder the files in Xcode, simply remove a folder reference and add it back -- the files in that folder will once again be in alphabetical order.
Admittedly, not as nice as in Xcode3, but once you have your project folder structure organized, it just takes a moment to re-alphabetize things without too much effort.
It's a missing feature, if you want to sort permanently. However, there is a feature to view items sorted temporarily, namely in the jump bar:
Tip: Hold down the Command key when selecting a level in the path menu to view its items alphabetically.
http://developer.apple.com/library/mac/#recipes/xcode_help-jump_bar/Recipe.html

- 2,344
- 2
- 17
- 7
-
useful tip, but wow that's obscure! i'm a fan of many of apple's many hidden shortcut keys and whatnot, but I'd *never* have thought to try that out... – drfrogsplat Jun 16 '11 at 03:43
-
1
-
How can a company worth 400 billion dollars not bother to just sort files by name permanently? Is that so hard? – tacos_tacos_tacos Jul 11 '13 at 09:23
- Quit your project
- Backup your project.pbxproj just in case
- find the "children" session of your most annoying directory
- sort it somehow (I used linux sort -k3)
- Open your project.
Worked for me :P

- 129
- 1
- 7