iOS developer roles at Indian product companies are well-compensated and increasingly require SwiftUI, async/await concurrency, and modern MVVM architecture patterns. Companies like Swiggy, CRED, PhonePe, and Razorpay all maintain dedicated iOS teams in India. This guide covers iOS developer interview questions for Indian companies in 2026.
Swift fundamentals and memory management
Swift core concepts:
1. Value types vs reference types: - Value types (struct, enum, tuple): copied when assigned or passed to a function. Each variable holds its own independent copy. Stored on the stack. Examples: Int, String, Array, Dictionary (all Swift standard library types are value types implemented as structs). - Reference types (class, function): not copied; a reference (pointer) to the heap-allocated object is passed. Multiple variables can reference the same object. - When to use struct vs class: use struct for simple data models (most Swift types); use class for shared mutable state or when you need inheritance.
2. ARC (Automatic Reference Counting): Swift uses ARC to manage memory for class instances. ARC tracks the number of strong references to each instance. When the reference count drops to zero, the instance is deallocated. Retain cycles: two class instances hold strong references to each other; neither's count drops to zero; memory leak. Fix: use weak (optional; becomes nil when the referenced instance is deallocated) or unowned (not optional; assumes the referenced instance outlives the reference; crashes if accessed after deallocation).
3. Optionals: An Optional represents a value that may be nil. Optional binding (if let, guard let): safely unwrap optionals. Optional chaining: user?.profile?.name — returns nil if any step is nil rather than crashing. Nil coalescing: user?.name ?? 'Guest' — provides a default if nil. Force unwrap (!) — unsafe; use only when you are certain the value is non-nil; prefer guard let or if let.
4. Swift concurrency (async/await): Async/await (Swift 5.5+): write asynchronous code that reads like synchronous code. func fetchUser() async throws -> User { return try await apiClient.get('/user') }. Call: let user = try await fetchUser(). Task: creates a new async context. @MainActor: ensures a function runs on the main thread. Structured concurrency: async let for parallel async tasks.
5. Protocols and protocol-oriented programming: Swift protocols define interfaces (method signatures, property requirements). Protocol extensions provide default implementations. Protocol-oriented programming: prefer protocols over class inheritance for code reuse. Codable (Encodable + Decodable): protocol for JSON serialisation/deserialisation; widely used with REST APIs.
UIKit vs SwiftUI and iOS architecture patterns
iOS architecture:
1. UIKit: UIKit is the original iOS UI framework (introduced in 2008). Imperative: you programmatically create UI elements, set their properties, and lay them out. View controllers (UIViewController) manage the lifecycle of a screen. Auto Layout: constraint-based layout system that adapts UI to different screen sizes. UIKit is well-established with a large ecosystem and is required for iOS apps that target older iOS versions (<13) or need advanced UI customisation.
2. SwiftUI: SwiftUI is Apple's declarative UI framework (introduced 2019, iOS 13+). Describe what the UI looks like in different states; the framework handles rendering. Views are value types (structs). @State: local mutable state in a view (causes the view to re-render when the value changes). @Binding: two-way connection to a @State in a parent view. @ObservableObject + @StateObject / @ObservedObject: for reference-type model objects that multiple views share. Combine: reactive framework for handling asynchronous events (data binding in UIKit + SwiftUI).
3. MVC (Model-View-Controller): The traditional iOS architecture pattern for UIKit. Model: data structures and business logic. View: UIView, UILabel (display only). Controller: UIViewController (handles user interaction, mediates between Model and View). Problem: 'Massive View Controller' — UIViewControllers tend to grow very large (network calls, data transformation, navigation, UI configuration all end up in the controller).
4. MVVM (Model-View-ViewModel): MVVM solves the Massive ViewController problem. ViewModel: contains the presentation logic; transforms the Model into data the View can display; exposes observable properties (@Published in Combine). View: observes the ViewModel and renders; no business logic. Model: data + business logic. In SwiftUI: View observes ViewModel via @ObservedObject or @StateObject; the ViewModel publishes data with @Published. Benefits: testable (ViewModel has no UIKit dependency; can be unit tested), separation of concerns.
iOS networking, persistence, and testing
iOS development practices:
1. Networking: URLSession: Swift's built-in networking API. Use URLSession.shared.data(from: url) for simple requests. async/await: the modern way to make network calls in Swift. Codable: encode/decode JSON responses to/from Swift structs. Popular third-party networking libraries: Alamofire (simplifies URLSession), Moya (type-safe network abstraction layer built on Alamofire).
2. Persistence: UserDefaults: key-value store for small amounts of data (user preferences, settings). Keychain: secure storage for sensitive data (auth tokens, passwords). CoreData: Apple's ORM; maps objects to a SQLite database; complex but powerful. SwiftData (iOS 17+): the modern, simpler replacement for CoreData using Swift macros. Realm: popular third-party object database; simpler API than CoreData. FileManager: read and write files to the app's sandbox (documents, caches, temporary directories).
3. iOS testing: XCTest: Apple's built-in testing framework. Unit tests: test ViewModels, business logic, utilities without UI. UI tests: test the full app interface using XCUIApplication (finds elements by accessibility identifiers). Mocking: use protocols to mock dependencies in unit tests (inject a MockNetworkClient instead of the real URLSession). Performance tests: XCTest provides measureBlock to test performance.
4. App lifecycle: SceneDelegate + AppDelegate (iOS 13+): the app's entry points. View controller lifecycle: viewDidLoad, viewWillAppear, viewDidAppear, viewWillDisappear, viewDidDisappear. Understanding when to initialise expensive resources (viewDidLoad, not init).
Practise iOS and mobile interview questions with HireStepX's AI voice interviewer. Get scored feedback on your explanations of Swift concurrency, SwiftUI architecture, and memory management. First 2 sessions free.
Practice freeiOS performance, push notifications, and common interview questions
iOS production topics:
1. Performance: Main thread only for UI updates: all UIKit updates must happen on the main thread; background work on DispatchQueue.global or with async/await + await MainActor.run. Instruments: Apple's profiling tool; use Time Profiler (CPU), Allocations (memory), Network (network requests), Core Data (database queries). Image caching: avoid re-downloading the same image; use SDWebImage or Kingfisher (popular Swift image caching libraries).
2. Push notifications: ApNS (Apple Push Notification service): Apple's push notification infrastructure. Register for push notifications: request permission (UNUserNotificationCenter), register with APNs, send the device token to your server. Local notifications: scheduled entirely on the device (no server required; e.g., reminders). Background fetch: apps can fetch data in the background when the system wakes them; configure background modes in Info.plist.
3. App architecture interview questions: - How do you handle dependency injection in iOS? Initialiser injection (pass dependencies via init), property injection (set after init), or a dependency injection container (Swinject, Factory). Protocol injection: inject a protocol, not a concrete type, so you can swap implementations in tests. - How do you handle deep links in an iOS app? URL scheme (yourapp://path): handle in AppDelegate's application(_:open:). Universal Links (https://yourdomain.com/path): link iOS handles natively; requires an associated domain configuration in the app and an apple-app-site-association file on your server. - What is an NSOperation vs a DispatchQueue? DispatchQueue: low-level GCD API; simple queue-based concurrency. NSOperation: higher-level abstraction on top of GCD; supports dependencies between operations (operation B starts only after operation A completes), cancellation, and max concurrent operation count.
Frequently asked questions
Explore more