iOS Development (Swift and Objective-C) Questions
Native iOS programming: the Swift language and Objective-C, Automatic Reference Counting and memory semantics, threading and concurrency on Apple platforms, and iOS SDK fundamentals. Covers writing correct native iOS code and reasoning about the platform's runtime and language rules. The primary Apple-platform mobile surface.
Explain Key-Value Observing (KVO) in Objective-C and Swift. How does KVO work under the hood, what requirements exist for properties to be observable, and what are common pitfalls when using KVO in Swift? Mention @objc and dynamic where relevant.
Explain differences between Key-Value Coding (KVC) and Key-Value Observing (KVO). What makes a property KVC/KVO-compliant, and what are modern Swift alternatives for observing changes (e.g., property observers, Combine)? Give examples of pitfalls with KVO on collections and how to observe safely.
In Swift, write code to decode JSON into model types using Codable. Given a JSON object that may miss keys, demonstrate how to provide safe fallback defaults and decode nested optional fields. Explain how you handle date formatting and unknown keys.
A view controller retains a closure property that captures self. After dismissing the view controller, it is not deallocated. Describe step-by-step how you would diagnose this retain cycle using Xcode and Instruments, list likely causes other than closures (timers, notifications, delegates), and provide code-level fixes for each identified cause.
Describe a plan for leading a team to reduce UI jank, CPU and battery usage, and memory bloat in a mobile app. Cover measurement strategy (what metrics to collect), how to identify hotspots, prioritization of fixes, concrete mitigations (off-main-thread decoding, reducing overdraw, batching work), rollout and monitoring strategy, and how you would communicate progress to stakeholders.
Unlock Full Question Bank
Get access to all 34 iOS Development (Swift and Objective-C) interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.