DevPrep

All topics

📝 The Swift Language: iOS interview questions

  1. What kinds of method dispatch does Swift have? Middle PRO
  2. What is copy-on-write (CoW)? Middle PRO
  3. What is type erasure and why is it needed? Senior PRO
  4. What is an associated type in a protocol? Middle PRO
  5. What is an enum? Junior PRO
  6. Advantages of Swift? Junior PRO
  7. What is an optional and what problems does it solve? Junior PRO
  8. static or the class modifier? Junior PRO
  9. Which Swift keyword creates recursive enums? Junior PRO
  10. What is defer? Junior PRO
  11. How do you pass a variable by reference? Junior PRO
  12. final, private, @objc, dynamic — how do they affect dispatch? Senior PRO
  13. Can you use @objc on a struct? Why not? Middle PRO
  14. What is a closure and what does @escaping mean? Middle PRO
  15. Equatable and Hashable — why? Why must a Dictionary key be Hashable? Junior PRO
  16. == vs === — what's the difference? Junior PRO
  17. let vs var for a struct — what changes with mutating methods? Junior PRO
  18. 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