Interview guides / mobile
iOS vs Android Interview Prep: What Changes
How iOS and Android interviews differ and what stays the same: fundamentals, coding, projects, debugging, and system design.
The hiring loop shape is similar. The vocabulary changes: ARC vs process death, GCD/async-await vs coroutines, UIKit/SwiftUI vs Views/Compose.
If you can map concepts across platforms, you prep faster and interview more confidently for mobile-general roles.
1.What maps between iOS and Android interview fundamentals?
Lifecycle, concurrency off main, state ownership, persistence, networking, and offline. iOS accents ARC/MainActor/SwiftUI state; Android accents Activity/process death/ViewModel/Compose recomposition.
2.Should you prep both tracks?
If you are applying broadly to mobile roles, yes at a shallow level. Specialize deeply in your primary platform, then borrow system design and debugging patterns from the other side.
3.Walk through the UIViewController lifecycle and where you would load data, configure UI, and clean up observers.
loadView → viewDidLoad (one-time setup) → viewWillAppear → viewIsAppearing → viewDidAppear → viewWillDisappear → viewDidDisappear → deinit. Load remote data after first appear or via a dedicated loader; remove NotificationCenter/KVO observers in deinit or viewDidDisappear depending on scope; cancel in-flight tasks when the screen disappears if results are no longer needed.
4.When do you pick delegate patterns vs completion closures?
Delegates suit multi-method ongoing relationships (tableView). Closures suit one-shot results. Avoid retain cycles: weak delegates, weak self captures.
5.What does iOS sandboxing restrict?
Apps can’t freely read other apps’ data; limited filesystem, entitlements for capabilities (iCloud, push, associated domains). Privacy manifests/permissions gate sensitive APIs.
6.What are common NotificationCenter bugs and how do you avoid them?
Forgetting to remove observers (pre-block API), posting on wrong threads, overusing global events. Prefer Combine publishers, delegates, or scoped observers; always consider lifecycle.
7.What is KVO and what replaced it in many Swift codebases?
KVO observes Obj-C property changes. Prefer Combine, Observation/@Observable, delegates, or closures for Swift-first code. KVO still appears with AVFoundation and legacy APIs.
8.What causes ANRs, and how do you diagnose them?
ANRs happen when the main thread is blocked (~5s for input). Avoid disk/network on Main; use coroutines. Diagnose with ANR traces, StrictMode, and Systrace/Perfetto. Mention BroadcastReceiver and Service timeouts too.
9.Security difference between implicit and explicit intents?
Explicit targets a component. Implicit resolve by filters—risk of interception. Use explicit for internal navigation; validate incoming intent extras.
10.Why specify FLAG_IMMUTABLE/MUTABLE on PendingIntents?
Required on modern APIs for security. Prefer IMMUTABLE unless you must update extras; prevents intent redirection attacks.
11.What are Entity, DAO, and Database in Room?
Entity=table, DAO=queries, Database=holder. Use suspend/Flow queries; type converters carefully; migrations mandatory for schema changes.
12.What belongs in a ViewModel vs UI layer?
UI state and business orchestration surviving rotation. No Android framework Views, no Context leaks (use Application context carefully). Expose immutable UI state flows.
Keep going with AceMobileInterview
Reading helps. Timed practice locks it in. Jump into the interactive track for algorithms with LeetCode links, studio projects, debugging zips, and mobile system design.