XC

Xcode Keyboard Shortcuts

75+ Xcode shortcuts for building, debugging, and navigating Apple development projects. Mac reference.

57 shortcuts 8 categories

Navigation

Action Shortcut
Open Quickly
Reveal in Project Navigator
Jump to method/function
Go to line
Jump to definition
Navigate back/forward
Switch header/implementation
Project Navigator
Debug Navigator
Breakpoint Navigator
Log Navigator

Editing

Action Shortcut
Toggle line comment
Toggle block comment
Indent right
Indent left
Re-indent selection
Fold code block
Unfold code block
Fold/unfold all methods
Duplicate line
Delete line
Move line up/down
Complete code / dismiss
Code completion

Build

Action Shortcut
Build
Run
Stop
Clean build folder
Run unit tests
Analyze

Debug

Action Shortcut
Toggle breakpoint
Continue / Pause
Step over
Step into
Step out
Debug - Continue to here
Clear console

Interface Builder

Action Shortcut
Size to fit content
Update frames
Add missing constraints
Object Library

Editor

Action Shortcut
Open Assistant Editor
Close Assistant Editor
Preview (SwiftUI)
Show code actions
Use selection for Find
Find in file
Find in project
Find next
Find previous

View

Action Shortcut
Toggle Navigator
Toggle Inspector
Toggle Debug area
Library

Source Control

Action Shortcut
Commit
Push
Source Control Navigator

Pro tips

Open Quickly Is Essential

⌘+⇧+O is the fastest way to open any file, class, or symbol. Start typing partial names - Xcode uses fuzzy matching to find what you need.

SwiftUI Canvas Preview

Use ⌘+⌥+P to toggle SwiftUI previews. Pin previews to keep them visible while editing other files. Use #Preview macros for multiple configurations.

Fix-it Suggestions

When Xcode shows an error or warning, click the red/yellow icon or press ⌘+⇧+A for suggested fixes. Xcode can auto-insert protocol stubs, fix syntax, and more.

Minimap Navigation

Enable the minimap (Editor → Minimap) for a bird's-eye view of your code. Click anywhere on it to jump to that section. Great for large files.

Breakpoint Actions

Right-click a breakpoint to add actions - log messages, play sounds, run shell scripts, or auto-continue. Powerful for debugging without modifying code.

Snippets Library

Drag code into the Snippets library (⌘+⇧+L → Snippets tab) to create reusable templates. Use completion shortcuts to insert them quickly.

Frequently asked questions

Is Xcode free?

Yes, Xcode is completely free on the Mac App Store. You only need a paid Apple Developer account ($99/year) to distribute apps on the App Store. Development and testing on simulators is free.

Can I use Xcode on Windows or Linux?

No, Xcode is macOS-only. You need a Mac to develop iOS, macOS, watchOS, and tvOS apps. Some developers use macOS virtual machines or cloud Mac services as alternatives.

What languages does Xcode support?

Primarily Swift and Objective-C for Apple platforms. Xcode also supports C, C++, and has basic support for Python, Ruby, and other languages through build scripts and external tools.

How do I reset Xcode settings?

Delete ~/Library/Developer/Xcode and ~/Library/Caches/com.apple.dt.Xcode. For derived data: ⌘+⇧+K (clean) or manually delete ~/Library/Developer/Xcode/DerivedData. Restart Xcode after.

What's the difference between Xcode and Swift Playgrounds?

Xcode is the full IDE for professional app development. Swift Playgrounds is a simplified learning tool for Swift programming, also capable of building simple SwiftUI apps for App Store submission.

How large is Xcode?

Xcode requires approximately 35-40 GB of disk space including simulators. The initial download is around 12 GB, but additional simulators and components add significantly to the size.

Want to master Xcode?

Go beyond shortcuts with in-depth Xcode video courses, from the basics all the way to advanced workflows.

Explore Xcode courses