xcsort is an Xcode extension that sorts lines of text.
1. Open a source code file, a JSON data file, or a text file in Xcode 8;
2. Select several lines of text;
3. Choose "Editor" - "xcsort" - "Sort Lines" menu command to sort the selected lines.

Sorting lines of code is useful to keep #import lines organized and avoid conflicts. When 2 people change a code file they might want to add a new #import line at the same time (at the end of the #include statements block) and will get conflicting changes. If the #import lines are sorted the chance of such conflict is smaller.

When working with text data files sometimes you might want to sort lines of a list, properties of a dictionary, or named constants. The xcsort extension can sort selected text in a file alphabetically. It is especially useful with longer lists or long lines when sorting manually becomes tedious.

This extension requires Xcode 8 to work. See additional instructions on the support webpage.

Ratings and Reviews

3.0 out of 5
4 Ratings

4 Ratings

dhoerl ,

Been wanting this for ages!

So nice to be able to sort. Note that for it to show up in the Editor window, you need to enable it in the System Prefs “Extensions” preference pane.

Ehnword ,

Doesn't work for XCode 10

Followed the directions in the help file and still couldn't get it to work.

I hope you fix it soon, because it looks like a very useful extension.

CaptainFearful ,

Abandonware. Hasn't worked in quite some time

Abandonware. Hasn't worked in quite some time. Since Xcode 10, this previously very useful extension has stopped working.


Daniel Lazarenko
96.9 KB
Developer Tools

OS X 10.11 or later, 64-bit processor



Age Rating
Rated 4+
© 2016 Daniel Lazarenko


  • Family Sharing

    With Family Sharing set up, up to six family members can use this app.

More By This Developer