If you're a Swift developer preparing for your next job interview, this page is perfect for you: I've collected over 150 of the top interview questions about iOS, Swift, UIKit, SwiftUI, and more, and also provided suggested approaches to answering each question.
These questions are used by companies around the world in their interviews. Not questions "like these" or "based on these" – companies literally use these exact questions. So, browsing through a few and testing yourself is a great way to prepare.
Questions are grouped by category, and I've also tried to provide some idea of difficulty using a traffic light system. Obviously my idea of "easy" or "hard" won't exactly match yours, but hopefully it at least lets you focus your attention more easily. To get started, select a category, then select a question that interests you.
Tip: For more kinds of interview preparation and career guidance, see my Swift Career Guide.
Questions that cover making apps easier to use for everyone.
Questions dealing with data and data structures.
Codable protocol do? Float, Double, and CGFloat data types? Codable? map() and compactMap()? UUID, and when might you use it? Result type? Questions about design patterns, code architectures, and other programming approaches.
Questions about Apple frameworks and APIs beyond UIKit and SwiftUI.
UserDefaults good for? What is UserDefaults not good for? NotificationCenter? CGAffineTransform? NSAttributedString? NSSortDescriptor? CALayer subclasses? CADisplayLink? General questions about building for iOS itself, or UI questions that apply to both UIKit and SwiftUI.
Color or UIColor has values outside 0 to 1? Questions that cover how you interact with Apple, other developers, designers, and more.
Questions about improving your apps to be faster, more efficient, less crashy, and similar.
Questions about how you store and send data.
Questions about the Swift language itself.
return keyword? #error compiler directive do? #if swift syntax do? assert() function do? canImport() compiler condition do? CaseIterable protocol do? final keyword do, and why would you want to use it? if let and guard let? try, try?, and try! in Swift? String? and String! in Swift? guard keyword in Swift? @main attribute do? #available syntax do? weak and unowned? defer keyword in Swift? targetEnvironment() compiler condition do? self and Self? @autoclosure? Questions about building apps with SwiftUI.
@Published property wrapper do? @State property wrapper do? onAppear()? @StateObject versus @ObservedObject? ButtonStyle protocol? GeometryReader? Questions about building apps with UIKit.
viewWithTag()? @IBOutlet and @IBAction? UIImage and a UIImageView? UIActivityViewController? UIVisualEffectView? IBDesignable? UIMenuController?