Where do I find the line number in the Xcode editor?

Solution 1:

For Xcode 4 and higher, open the preferences (command+,) and check "Show: Line numbers" in the "Text Editing" section.

Xcode 9 enter image description here

Xcode 8 and below Xcode Text Editing Preferences screen capture with Text Editing and Line Numbers highlighted

Solution 2:

In Preferences->Text Editing-> Show: Line numbers you can enable the line numbers on the left hand side of the file.