Xcode Keyboard Shortcuts for iOS Development
Essential Xcode keyboard shortcuts for iOS and macOS developers. Navigation, editing, debugging, Interface Builder, and simulator shortcuts.
Why Learn Xcode Keyboard Shortcuts?
Xcode is the only IDE for building iOS, macOS, watchOS, and tvOS apps. It is a massive application with hundreds of features, and navigating it with the mouse alone is slow. Mastering keyboard shortcuts lets you build, debug, and ship apps significantly faster.
This guide covers the most important Xcode shortcuts organized by workflow category.
---
Build and Run
These are the shortcuts you will use most often during development.
| Action | Shortcut |
|---|---|
| Build | Cmd + B |
| Run | Cmd + R |
| Stop | Cmd + . |
| Test | Cmd + U |
| Profile (Instruments) | Cmd + I |
| Analyze | Cmd + Shift + B |
| Clean Build Folder | Cmd + Shift + K |
| Build for Testing | Cmd + Shift + U |
---
Navigation
| Action | Shortcut |
|---|---|
| Open Quickly | Cmd + Shift + O |
| Jump to Definition | Ctrl + Cmd + J |
| Show/Hide Navigator | Cmd + 0 |
| Project Navigator | Cmd + 1 |
| Source Control Navigator | Cmd + 2 |
| Symbol Navigator | Cmd + 3 |
| Find Navigator | Cmd + 4 |
| Issue Navigator | Cmd + 5 |
| Test Navigator | Cmd + 6 |
| Debug Navigator | Cmd + 7 |
| Breakpoint Navigator | Cmd + 8 |
| Report Navigator | Cmd + 9 |
| Show/Hide Debug Area | Cmd + Shift + Y |
| Show/Hide Inspector | Cmd + Option + 0 |
| Show/Hide Library | Cmd + Shift + L |
| Jump Bar | Ctrl + 6 (functions in current file) |
| Go Back | Cmd + Ctrl + Left |
| Go Forward | Cmd + Ctrl + Right |
---
File and Tab Management
| Action | Shortcut |
|---|---|
| New Tab | Cmd + T |
| Close Tab | Cmd + W |
| New File | Cmd + N |
| Open file in Assistant Editor | Cmd + Option + Enter |
| Show Standard Editor | Cmd + Enter |
| Next Tab | Cmd + Shift + ] |
| Previous Tab | Cmd + Shift + [ |
| Show Related Items | Ctrl + 1 |
---
Editing
| Action | Shortcut |
|---|---|
| Comment/Uncomment | Cmd + / |
| Indent | Cmd + ] |
| Outdent | Cmd + [ |
| Move line up | Cmd + Option + [ |
| Move line down | Cmd + Option + ] |
| Re-indent (auto-format) | Ctrl + I |
| Delete line | Cmd + Shift + K (custom) |
| Fold code block | Cmd + Option + Left |
| Unfold code block | Cmd + Option + Right |
| Fold all methods | Cmd + Option + Shift + Left |
| Unfold all methods | Cmd + Option + Shift + Right |
| Edit All in Scope | Cmd + Ctrl + E |
| Find and Replace | Cmd + Option + F |
| Find in Project | Cmd + Shift + F |
---
Code Completion and Documentation
| Action | Shortcut |
|---|---|
| Show completions | Esc or Ctrl + Space |
| Accept completion | Tab or Enter |
| Quick Help (documentation) | Option + Click symbol |
| Open Documentation | Cmd + Shift + 0 (zero) |
| Show callers | Ctrl + Cmd + Shift + H |
---
Debugging
| Action | Shortcut |
|---|---|
| Toggle Breakpoint | Cmd + \ |
| Enable/Disable Breakpoints | Cmd + Y |
| Continue (Resume) | Cmd + Ctrl + Y |
| Step Over | F6 |
| Step Into | F7 |
| Step Out | F8 |
| Open Debug Console | Cmd + Shift + C |
| Show/Hide Debug Area | Cmd + Shift + Y |
| Add Expression to Watch | Right-click in Debug area |
| View Memory | Debug > Debug Workflow > View Memory |
Breakpoint Tips
- Conditional Breakpoints: Right-click a breakpoint to add conditions, actions, or make it auto-continue.
- Symbolic Breakpoints: Use Breakpoint Navigator > "+" to add breakpoints on method names like
-[UIViewController viewDidAppear:]. - Exception Breakpoints: Add one to catch all Objective-C or Swift exceptions automatically.
---
Interface Builder / Storyboard
| Action | Shortcut |
|---|---|
| Show Library | Cmd + Shift + L |
| Show Attributes Inspector | Cmd + Option + 4 |
| Show Size Inspector | Cmd + Option + 5 |
| Show Connections Inspector | Cmd + Option + 6 |
| Show Identity Inspector | Cmd + Option + 3 |
| Zoom to Fit | Cmd + = |
| Actual Size | Cmd + 0 |
| Embed in Stack View | Select views > Editor > Embed In > Stack View |
| Add New Constraints | Bottom of canvas constraint buttons |
| Update Frames | Cmd + Option + = |
| Reset to Suggested Constraints | Cmd + Shift + = |
---
SwiftUI Previews
| Action | Shortcut |
|---|---|
| Toggle Canvas | Cmd + Option + Enter |
| Resume Preview | Cmd + Option + P |
| Live Preview | Click "Play" on preview or use Canvas menu |
| Preview on Device | Select device in Canvas |
| Pin Preview | Click pin icon in Canvas |
---
Simulator Shortcuts
When the iOS Simulator is focused:
| Action | Shortcut |
|---|---|
| Home button | Cmd + Shift + H |
| Rotate left | Cmd + Left |
| Rotate right | Cmd + Right |
| Screenshot | Cmd + S |
| Record video | Cmd + R |
| Shake gesture | Cmd + Ctrl + Z |
| Toggle appearance (dark/light) | Cmd + Shift + A |
| Slow animations | Debug > Slow Animations or Cmd + T |
| Simulate memory warning | Debug > Simulate Memory Warning |
| Toggle keyboard | Cmd + K |
| Paste from Mac clipboard | Cmd + V |
---
Source Control (Git)
| Action | Shortcut |
|---|---|
| Commit | Cmd + Option + C |
| Push | Source Control menu |
| Pull | Source Control menu |
| Show Source Control Navigator | Cmd + 2 |
| Show Changes | Source Control > Show Changes |
| Discard Changes | Right-click file > Source Control > Discard |
---
Top 10 Xcode Shortcuts for Daily Use
- Cmd + R — Run your app.
- Cmd + B — Build without running.
- Cmd + Shift + O — Open Quickly. The fastest way to jump to any file, class, or method.
- Cmd + / — Toggle line comment.
- Cmd + \ — Toggle breakpoint.
- Cmd + Shift + K — Clean build folder (fixes many mysterious build errors).
- Cmd + Shift + Y — Toggle debug area.
- Cmd + 0 — Toggle navigator sidebar.
- Ctrl + I — Re-indent selected code.
- Cmd + Shift + L — Open the library to add UI elements or code snippets.
---
Tips for Mastering Xcode Shortcuts
- Learn Open Quickly first.
Cmd + Shift + Oreplaces most of your file navigator usage. - Use the navigator numbers.
Cmd + 1throughCmd + 9switch between navigator tabs instantly. - Customize shortcuts in Xcode > Settings > Key Bindings if the defaults do not suit you.
- Practice with spaced repetition. Tools like Keyhab let you drill Xcode shortcuts daily until they become muscle memory.
---
Conclusion
Xcode is a complex IDE, but its keyboard shortcuts make it manageable and efficient. Start with the build/run and navigation shortcuts, then expand to editing and debugging as you become comfortable. Daily practice will transform your iOS development workflow.