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 Automatic Reference Counting (ARC) in Swift and Objective-C. Describe how ARC manages object lifetimes, how retain cycles occur (show a closure and delegate example), and how weak and unowned references differ. Include how to use capture lists in closures to avoid retain cycles.
Explain closures in Swift and the difference between escaping and non-escaping closures. What does the @escaping attribute mean, when is it required, and how does it affect capturing semantics? Provide a short example where a closure must be marked @escaping and how to avoid strong self capture inside it.
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.
Implement custom view controller containment in UIKit: create a ParentViewController that can host and switch between child view controllers with animated transitions. Provide the correct sequence of API calls (addChild, willMove(toParent:), didMove(toParent:), removeFromParent), view hierarchy handling, frame/layout updates, and an example of using transition(from:to:duration:options:animations:completion:).
Describe how to implement periodic background refresh of app content on iOS. Compare Background Fetch, BGTaskScheduler (BGAppRefreshTask/BGProcessingTask), silent push notifications, and background URLSession. For each, explain constraints (time limits, execution opportunities), scheduling strategy, and how to test them.
Unlock Full Question Bank
Get access to all 33 iOS Development (Swift and Objective-C) interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.