📝 The Swift Language: iOS interview questions
- What kinds of method dispatch does Swift have? Middle PRO
- What is copy-on-write (CoW)? Middle PRO
- What is type erasure and why is it needed? Senior PRO
- What is an associated type in a protocol? Middle PRO
- What is an enum? Junior PRO
- Advantages of Swift? Junior PRO
- What is an optional and what problems does it solve? Junior PRO
- static or the class modifier? Junior PRO
- Which Swift keyword creates recursive enums? Junior PRO
- What is defer? Junior PRO
- How do you pass a variable by reference? Junior PRO
- final, private, @objc, dynamic — how do they affect dispatch? Senior PRO
- Can you use @objc on a struct? Why not? Middle PRO
- What is a closure and what does @escaping mean? Middle PRO
- Equatable and Hashable — why? Why must a Dictionary key be Hashable? Junior PRO
- == vs === — what's the difference? Junior PRO
- let vs var for a struct — what changes with mutating methods? Junior PRO
- Can you make a weak var for a struct? Why not? Middle PRO
Practice this before your interview
DevPrep turns these answers into one-minute challenges: what does this code print, find the bug, mock interviews. One challenge a day.
Get DevPrep on the App Store