Xcode shortcuts to boost your iOS development speed and productivityπŸ‘¨πŸ»β€πŸ’»

Yagnik Suthar
Simform Engineering
5 min readApr 19, 2021

Powerful keys to know for every developer to increase productivity.

As a developer, we spend most of the time on Xcode IDE. When I started my development career, I wondered how my senior work much faster than me. When I asked him how can you do that, he replied that it’s β€œmagic”. But when I observed them, they frequently used some shortcuts. And I predominantly used the mouse instead of keyboard shortcuts, which inspired me to discover some shortcuts that boost my development life.

The purpose of writing this blog is to share knowledge with every iOS engineers and help them to boost their speed of productivity.

One more thing I want to convey that this blog helps every type of developer whether he is a junior, senior, or pro developer.

I have summarised 3 types of shortcuts into this blog

  • Basic Shortcuts
  • Intermediate Shortcuts
  • Pro(Advance) Shortcuts

So let’s start to explore…

You don’t need to memorize this list to follow through. I’ve added the named shortcuts alongside the symbols throughout.

1. Basic Shortcuts πŸ‘¨πŸ»β€πŸ’Ό

List of the most common shortcuts used in Xcode:

  • Build Project: ⌘ + B
    (Command + B)
  • Run Project: ⌘ + R
    (Command + R)
  • Test Project: ⌘ + U
    (Command + U)
  • Stop Running Project: ⌘ +.
    (Command + . (Dot))
  • Clean Project: ⌘ + ⇧ + K
    (Command + Shift + U)
  • Clean the build folder: ⌘ + ⇧ + βŒ₯ + K
    (Command + Shift + Option + K)
  • Open quickly: ⇧ + ⌘ + O
    (Shift + Command + O)
  • Code completion: βŒƒ + Space
    (Control + Space)

Workspace(Xcode IDE) Shortcuts

List of the most common workspace shortcuts used in Xcode:

Hide/Show Navigation Area: ⌘ + 0
Hide/Show Navigation Area: ⌘ + 0 (Command + 0)
Hide/Show Debugging Area : ⌘+⇧+Y (Command + Shift + Y)
Hide/Show Utility Area : ⌘+βŒ₯+ 0 (Command + Option + 0)
Navigation through Inspector Area Tabs: ⌘ 1 to 9 (Command + 1 to 9)
  1. Show project navigator: ⌘ + 1
  2. Show the source control navigator: ⌘ + 2
  3. Show the symbol navigator: ⌘ + 3
  4. Show the find navigator: ⌘ + 4
  5. Show the issue navigator: ⌘ + 5
  6. Show the test navigator: ⌘ + 6
  7. Show the debug navigator: ⌘ + 7
  8. Show the breakpoint navigator: ⌘ + 8
  9. Show the report navigator: ⌘ + 9
Navigation through Utilities Area Tabs: βŒ₯ + ⌘ + 1 to 7 (Option + Command + 1 to 7)
  1. Show the file inspector: βŒ₯ +⌘ + 1
  2. Show the history inspector: βŒ₯ +⌘ + 2
  3. Show the quick help inspector: βŒ₯ +⌘ + 3
  4. Show the identify inspector: βŒ₯ +⌘ + 4
  5. Show the attribute inspector: βŒ₯ +⌘ + 5
  6. Show the size inspector: βŒ₯ +⌘ + 6
  7. Show the connection inspector: βŒ₯ +⌘ + 7

2. Intermediate Shortcuts πŸ‘¨πŸ»β€πŸ’»

1. Open quickly inside the project

Open quickly: ⇧ + ⌘ + O (Shift + Command + O)

2. Assistance Editor

Open/Close Assistance editor: ⌘ +βŒ₯ + ⏎ (Command + Option + Enter)

3. Auto documentation

Auto-documentation: ⌘ +βŒ₯ + / (Command + Option + Right Slash)

4. Objects Library

Open quickly objects: ⇧ + ⌘ + L (Shift + Command + L)

5. Comment specific line or block: ⌘ + / (Command + Right Slash)

Comment specific line or block: ⌘ + / (Command + Right Slash ( / ))

6. Fold/Unfold class or method body: βŒ₯ + ⌘ + ← OR βŒ₯ + ⌘ + β†’
(Option + Command+ Left arrow OR Option + Command+ Right arrow)

Fold/Unfold class or method body: βŒ₯ + ⌘ + ← OR βŒ₯ + ⌘ + β†’ (Option + Command+ Left arrow/ Right arrow)

7. Reorder statements: βŒ₯ + ⌘ + [ OR βŒ₯ + ⌘ + ]
(Option + Command+ Left square bracket/ Right square bracket)

Reorder statements: βŒ₯ + ⌘ + [ OR βŒ₯ + ⌘ + ]
(Option + Command+ Left square bracket / Right square bracket)

8. Indent Code: ⌘ + [ OR ⌘ + ]
(Command+ Left square bracket / Right square bracket)

Indent Code: ⌘ + [ OR ⌘ + ]
(Command+ Left square bracket / Right square bracket)

9. Add and Remove breakpoints: ⌘ + \ (Command+ Left slash)

Add and Remove breakpoints: ⌘ + \ (Command+ Left slash)

10. Enable/Disable all breakpoints: ⌘ + Y (Command+ Y)

Enable/Disable all breakpoints: ⌘ + Y (Command+ Y)

11. Show/hide completions: βŽ‹ OR βŒƒ + Space (Escape) OR (Control + Space)

Show/hide completions: βŽ‹ OR βŒƒ + Space
(Escape) OR (Control + Space)

12. Jump to Definition: ^+⌘+J OR ^+⌘+Click
(Control + Command+ J) OR (Control + Command+ Click)

Jump to Definition: ^ + ⌘ + J OR ^ + ⌘ + Click
(Control + Command+ J) OR (Control + Command+ Click)

3. Pro(Advance) Shortcuts πŸš€

1. Find any method or function within the file: βŒƒ+6 (Control + 6)

Find any method or function within file: βŒƒ + 6 (Control + 6)

2. Edit/Rename variable/method name all in the scope: βŒƒ + ⌘ + E (Control + Command+ E)

Edit/Rename variable/method name all in the scope: βŒƒ + ⌘ + E (Control + Command+ E)

3. Fix all auto suggestion/error in the code: ^+βŒ₯+⌘+F
(Control +Option + Command+ F)

Fix all auto suggestion/error in the code: ^ + βŒ₯ + ⌘ + F
(Control + Option + Command + F)

4. Find text in the project: ⇧+⌘+F (Shift + Command + F)

Find text in project: ⇧ + ⌘ + F (Shift + Command + F)

5. Find method call hierarchy: ⇧ + ^ + ⌘ + H
(Shift + Control + Command+ H)

Find method call hierarchy: ⇧ + ^ + ⌘ + H (Shift + Control + Command+ H)

6. Jump to Line: ⌘ + L (Command + L)

Jump to Line: ⌘ + L (Command+ L)

7. Multiple cursor: ⇧ + ^ + Click (Shift +Control + Click)

Conclusion

I’m sure the above shortcuts are going to help you a lot but it’s hard to memorize every shortcut in one go so please be patient and try to adopt a couple of shortcuts in your daily development routine and one day you will be the Ninja developer.

Hope these tips helped you out and you learned something new today, if you enjoyed reading this article be sure to throw me a couple of claps πŸ–.

Let me know what you think and share your favorite Xcode shortcuts with us in the comments.

--

--

Yagnik Suthar
Simform Engineering

ο£Ώ Sr. Software Engineer @simform + gamer + blogger + Traveler