Swift interviews—especially iOS roles—cover optionals, value vs reference types, ARC, protocols, generics, error handling, concurrency, and UIKit/SwiftUI lifecycle compared to Kotlin, Java, and JavaScript.
Must-know topics
let/var, optionals, guard, and error handling- Struct vs class, ARC, weak/unowned, capture lists
- Protocols, extensions, protocol-oriented design
- Generics, associated types, some Codable/JSON
- async/await, actors, MainActor for UI
- GCD basics, RunLoop, and when to prefer structured concurrency
Important interview questions and answers
- Q: Explain optionals in Swift.
A: Optionals model absence withT?; unwrap safely with if-let/guard, use ?? for defaults, avoid force unwrap in production. - Q: Struct vs class?
A: Structs are value types copied on assignment; classes are reference types with ARC—prefer structs for models, classes for shared identity or UIKit controllers.
Self-check
- List three Swift topics you will review before interviews.
- How does Swift memory management differ from Java GC?
Tip: Be ready to explain optionals, struct vs class, ARC, and async/await on iOS interviews.
Interview prep
- Must-know topics?
Optionals, struct vs class, ARC, protocols, generics, async/await.
- ARC vs Java GC?
ARC deterministic reference counting; Java uses tracing garbage collection.