HireHireInterview Quizzes › Mobile App Developer

Mobile App Developer Interview Questions

Think you're ready? These are the questions that actually decide Mobile App Developer interviews. Warm up on Easy — then face the Hard round, where 95% of candidates crumble. 80 questions across 3 levels, instant score, completely free.

80Questions
3Difficulty levels
95%Fail the hard round
FreeInstant score
Easy
Warm-up · 20 Qs
Medium
Practical · 30 Qs
Hard
Brutal · 30 Qs
⚡ Take the Mobile App Developer quiz — get your score →

The Mobile App Developer interview questions

Below are the real questions, grouped by difficulty. Expand any one to reveal the correct answer and why — or take the timed quiz for a score you can share. Can you clear the Hard round?

Easy round 20 questions

You perform a slow network call directly on the main/UI thread of a mobile app. What is the typical user-visible result?
  • A. The app runs faster
  • B. The UI freezes or the app shows ANR/hang ✓
  • C. Battery usage drops
  • D. The network call is cached automatically
Correct answer: B. Blocking the main thread with slow work freezes the UI and can trigger an ANR (Android) or hang (iOS).
An Android Activity is rotated from portrait to landscape. By default, what happens to the Activity?
  • A. Nothing, it stays exactly as-is
  • B. It is destroyed and recreated ✓
  • C. It moves to the background permanently
  • D. It becomes a Service
Correct answer: B. A configuration change like rotation destroys and recreates the Activity by default, so state must be preserved.
You want to store a small user preference like 'dark mode enabled' on the device. Which storage fits best?
  • A. A full SQL database table
  • B. Key-value preferences (SharedPreferences/UserDefaults) ✓
  • C. A remote server only
  • D. The app's APK/IPA bundle
Correct answer: B. Small key-value settings belong in SharedPreferences (Android) or UserDefaults (iOS), not a full database.
Your app needs the camera. On modern Android/iOS, when should you request the camera permission?
  • A. At install time only
  • B. At runtime, when the feature is first needed ✓
  • C. Never, it is always granted
  • D. Only from a background service
Correct answer: B. Modern platforms use runtime permission requests shown when the feature is actually needed.
A ListView/RecyclerView shows the wrong image on some rows while scrolling fast. What common cause explains this?
  • A. Views are recycled and async image loads land on reused rows ✓
  • B. The images are too small
  • C. The list has too few items
  • D. Permissions were denied
Correct answer: A. Recycled row views can receive a stale async image if the load isn't tied to the current position.
You hardcode UI text strings directly in your layouts. Why is using a resource/localization file better?
  • A. It makes the app larger
  • B. It enables translation and reuse without touching layouts ✓
  • C. It disables dark mode
  • D. It speeds up the network
Correct answer: B. Externalizing strings into resource files enables localization and centralized reuse.
Your app must keep working when the phone has no internet connection. Which design supports this?
  • A. Always require a live API call for every screen
  • B. Cache data locally and sync when back online ✓
  • C. Disable the app when offline
  • D. Store everything only in RAM
Correct answer: B. Local caching with later sync provides an offline-capable experience.
In iOS, you update a UILabel's text from inside a background thread's completion handler and the UI behaves unpredictably. What is the fix?
  • A. Update UI on the main thread ✓
  • B. Add more background threads
  • C. Disable Auto Layout
  • D. Use a larger font
Correct answer: A. UIKit is not thread-safe; UI updates must be dispatched to the main thread.
You need your layout to look correct on both a small phone and a large tablet. Which approach helps most?
  • A. Fixed pixel widths for every view
  • B. Responsive/constraint-based layouts using relative sizing ✓
  • C. One screenshot scaled up
  • D. Hardcoding one device's resolution
Correct answer: B. Constraint/responsive layouts with relative sizing adapt across different screen sizes.
An Android app holds a reference to an Activity inside a long-lived static field. What problem can this cause?
  • A. Faster startup
  • B. A memory leak preventing the Activity from being garbage collected ✓
  • C. Automatic dark mode
  • D. Better battery life
Correct answer: B. A static reference to an Activity outlives it, leaking memory by blocking garbage collection.
You call a REST API that returns JSON. What must your app do before showing the data in native UI widgets?
  • A. Render the raw bytes directly
  • B. Parse/deserialize the JSON into model objects ✓
  • C. Convert it to an image
  • D. Store it in the manifest
Correct answer: B. JSON responses must be parsed into model objects before binding to native UI.
Your app's API key is written as a plain string in the client source code. Why is this a concern?
  • A. It slows compilation
  • B. It can be extracted from the app package by attackers ✓
  • C. It disables push notifications
  • D. It breaks localization
Correct answer: B. Secrets shipped in the client can be reverse-engineered out of the app package.
A user taps a button rapidly and your app submits the same order twice. What is a simple mobile-side mitigation?
  • A. Increase the animation speed
  • B. Disable the button after the first tap until the request finishes ✓
  • C. Add more threads
  • D. Remove the network call
Correct answer: B. Disabling the control after the first tap prevents duplicate submissions from rapid presses.
You want a small background task to run reliably even if the user closes the app, respecting OS battery limits. What is the right tool category?
  • A. A tight loop on the main thread
  • B. A scheduled background work API (WorkManager/BackgroundTasks) ✓
  • C. An infinite foreground animation
  • D. A synchronous network call at launch
Correct answer: B. Deferrable background work should use the platform's scheduler (WorkManager / BGTaskScheduler), which respects battery constraints.
Your app crashes only for some users in production but never in your testing. What is the most useful first step to diagnose it?
  • A. Rewrite the whole app
  • B. Integrate a crash-reporting tool to collect stack traces ✓
  • C. Remove all logging
  • D. Ship without changes and wait
Correct answer: B. Crash-reporting tools capture real-world stack traces you can't reproduce locally.
You bundle three high-resolution images at only one density. On low-density phones, what typically happens?
  • A. Images load faster and smaller
  • B. Larger app size and unnecessary memory use on small devices ✓
  • C. Images disappear entirely
  • D. The app switches to web view
Correct answer: B. Shipping only large assets wastes storage and memory on lower-density devices; density-specific assets are preferred.
In a mobile app using MVVM, what is the ViewModel primarily responsible for?
  • A. Drawing pixels on screen directly
  • B. Holding UI state and logic, decoupled from the view ✓
  • C. Storing the APK signing key
  • D. Managing the OS kernel
Correct answer: B. The ViewModel holds presentation state and logic, separated from the view that renders it.
Your app needs to notify users of a message even when the app is closed. Which mechanism is appropriate?
  • A. A while-loop polling every second in the app
  • B. Push notifications via FCM/APNs ✓
  • C. A hidden WebView
  • D. Rotating the screen
Correct answer: B. Push notifications (FCM/APNs) deliver server-triggered messages without the app running.
You publish an app update but must support users who never update. What API practice helps avoid breaking old clients?
  • A. Delete old endpoints immediately
  • B. Version your API and keep backward compatibility ✓
  • C. Force-close old app versions
  • D. Send larger payloads
Correct answer: B. Versioning APIs and preserving backward compatibility keeps older installed clients working.
A screen re-fetches data from the network every single time it becomes visible, even seconds apart. What is the user-facing downside?
  • A. Better security
  • B. Wasted bandwidth, slower UI, and more battery drain ✓
  • C. Improved offline support
  • D. Smaller app size
Correct answer: B. Redundant refetching wastes bandwidth and battery and slows the UI; caching with sensible invalidation is better.

Medium round 30 questions

In Android, you need to perform a network request when a button is tapped. Doing this directly on the main thread will cause a NetworkOnMainThreadException. Which approach is the recommended modern way to handle this?
  • A. Run the request inside a Kotlin coroutine launched on Dispatchers.IO ✓
  • B. Wrap the request in a try/catch block on the main thread
  • C. Increase the main thread priority before the call
  • D. Use runOnUiThread { } to execute the network call
Correct answer: A. Network I/O should run off the main thread, and launching a coroutine on Dispatchers.IO is the standard modern approach.
In iOS development, you fetch data from an API in a background closure and want to update a UILabel with the result. What must you do?
  • A. Update the label directly since closures run on the main thread
  • B. Dispatch the UI update to DispatchQueue.main.async ✓
  • C. Call the update inside DispatchQueue.global().async
  • D. Wrap the update in an autoreleasepool block
Correct answer: B. All UIKit updates must happen on the main thread, so UI changes from a background context must be dispatched to DispatchQueue.main.
A user reports that your app loses their form input when they rotate the screen on Android. What is the most likely cause?
  • A. The app is missing INTERNET permission
  • B. The Activity is recreated on configuration change and state was not saved ✓
  • C. The layout XML uses the wrong root element
  • D. The device has low memory and killed the process
Correct answer: B. A rotation triggers a configuration change that recreates the Activity, so unsaved state (e.g., via onSaveInstanceState or a ViewModel) is lost.
You are building a scrollable list of thousands of items in React Native. Which component should you use for best performance?
  • A. A ScrollView containing all items mapped with .map()
  • B. FlatList with a keyExtractor and renderItem ✓
  • C. A View with overflow set to scroll
  • D. Nested ScrollViews for pagination
Correct answer: B. FlatList virtualizes rendering so only visible items are mounted, unlike ScrollView which renders every child at once.
In Flutter, you have a StatefulWidget and change a variable that affects the UI. What must you call for the change to appear on screen?
  • A. build()
  • B. setState() ✓
  • C. initState()
  • D. notifyListeners()
Correct answer: B. setState() marks the widget dirty and schedules a rebuild so the UI reflects the updated state.
Your app must store a user's authentication token securely on the device. Which storage option is appropriate?
  • A. SharedPreferences on Android / UserDefaults on iOS
  • B. A plain text file in the app's cache directory
  • C. Android Keystore / iOS Keychain ✓
  • D. A global in-memory variable
Correct answer: C. The Keystore and Keychain are the OS-provided encrypted stores designed to hold sensitive credentials like tokens.
You submitted an Android app but it was rejected for requesting the ACCESS_FINE_LOCATION permission. The reviewer says location is only needed briefly when the user taps a button. What is the correct fix?
  • A. Request the permission at runtime only when the feature is used, and justify it ✓
  • B. Remove all permissions from the manifest
  • C. Move the permission request to Application.onCreate()
  • D. Request the permission silently in the background at launch
Correct answer: A. Runtime permissions should be requested contextually when the feature is used, with a clear justification, per platform policy.
In Git, you are working on a feature branch and want to incorporate the latest changes from main while keeping a clean, linear history before opening a PR. Which command is appropriate?
  • A. git rebase main ✓
  • B. git reset --hard main
  • C. git cherry-pick main
  • D. git push --force origin main
Correct answer: A. Rebasing your feature branch onto main replays your commits on top of the latest main, producing a linear history.
Your iOS app is crashing with 'unexpectedly found nil while unwrapping an Optional value.' What is the safest way to prevent this class of crash?
  • A. Force unwrap with ! after checking the debugger
  • B. Use optional binding (if let / guard let) or nil-coalescing ✓
  • C. Declare all variables as implicitly unwrapped optionals
  • D. Wrap the code in a do/catch block
Correct answer: B. Safe unwrapping via if let, guard let, or ?? handles the nil case explicitly instead of crashing on a forced unwrap.
A REST API call in your app returns HTTP 401. What does this typically indicate your app should do?
  • A. Retry the same request immediately with no changes
  • B. Refresh or re-obtain the authentication credentials ✓
  • C. Show a 'server is down' message
  • D. Switch the request from HTTPS to HTTP
Correct answer: B. A 401 Unauthorized means the credentials are missing or invalid, so the app should refresh the token or prompt re-authentication.
In Android, why should long-running or blocking work never run on the main (UI) thread?
  • A. It uses more battery than background threads
  • B. It can trigger an Application Not Responding (ANR) error and freeze the UI ✓
  • C. The main thread cannot access the network at all
  • D. It automatically crashes with a NullPointerException
Correct answer: B. Blocking the main thread stalls UI rendering and input, triggering ANR if unresponsive for ~5 seconds.
In the Android Jetpack architecture, what is the primary role of a ViewModel?
  • A. To render XML layouts directly
  • B. To hold and manage UI-related state surviving configuration changes like rotation ✓
  • C. To perform database migrations
  • D. To handle push notifications
Correct answer: B. ViewModel stores UI state that survives configuration changes (e.g., screen rotation) without reloading data.
In Swift, what is the main advantage of a struct over a class for a simple data model?
  • A. Structs support inheritance while classes do not
  • B. Structs are value types, copied on assignment, avoiding shared mutable reference bugs ✓
  • C. Structs are always stored on the heap
  • D. Structs allow deinitializers
Correct answer: B. Swift structs are value types with copy semantics, avoiding unintended shared-state mutations common with reference types.
In React Native, what does the JavaScript 'bridge' (or JSI in newer versions) primarily do?
  • A. Compiles JavaScript to native machine code ahead of time
  • B. Enables communication between JavaScript logic and native platform modules ✓
  • C. Renders HTML in a WebView
  • D. Stores app data persistently
Correct answer: B. The bridge/JSI marshals calls between the JS thread and native modules, enabling access to native APIs.
In Kotlin coroutines, what does the 'suspend' keyword indicate about a function?
  • A. It runs only on the main thread
  • B. It can be paused and resumed without blocking the underlying thread ✓
  • C. It executes synchronously and blocks
  • D. It automatically retries on failure
Correct answer: B. A suspend function can suspend its coroutine and resume later, freeing the thread instead of blocking it.
Which storage option is most appropriate for storing a user's authentication token securely on iOS?
  • A. UserDefaults
  • B. Keychain ✓
  • C. A plain plist file
  • D. In-memory global variable
Correct answer: B. The iOS Keychain provides encrypted, secure storage for sensitive data like tokens and credentials.
In Flutter, what is the difference between a StatelessWidget and a StatefulWidget?
  • A. StatelessWidget can rebuild with changing internal state; StatefulWidget cannot
  • B. StatefulWidget maintains mutable state that can change and trigger rebuilds; StatelessWidget is immutable ✓
  • C. StatelessWidget is only for animations
  • D. There is no functional difference
Correct answer: B. StatefulWidget holds mutable state via a State object and can call setState to rebuild; StatelessWidget is immutable.
What is the main reason to use pagination when displaying a long list from a remote API on mobile?
  • A. To improve the app's icon quality
  • B. To avoid loading and rendering huge datasets at once, saving memory and bandwidth ✓
  • C. To bypass permission checks
  • D. To make the app work offline automatically
Correct answer: B. Pagination loads data in chunks, preventing excessive memory use and network cost from fetching everything at once.
On Android, which mechanism is recommended for deferrable, guaranteed background work like periodic data syncing?
  • A. A tight while-loop on the main thread
  • B. WorkManager ✓
  • C. A raw Thread that never stops
  • D. AsyncTask in a loop
Correct answer: B. WorkManager schedules deferrable, constraint-aware background work that survives app restarts and respects Doze mode.
In iOS, what happens to an app's execution shortly after it moves to the background under normal conditions?
  • A. It continues running all threads indefinitely
  • B. It is typically suspended, and may be terminated by the system to reclaim resources ✓
  • C. It is immediately deleted from the device
  • D. It keeps the CPU at full speed
Correct answer: B. iOS suspends backgrounded apps and can terminate them under memory pressure, so persistent work needs special APIs.
On Android, long-running or blocking work should NOT be performed on...
  • A. The main (UI) thread ✓
  • B. A background thread
  • C. A Kotlin coroutine on Dispatchers.IO
  • D. A WorkManager worker
Correct answer: A. Blocking the main thread freezes the UI and can trigger ANR errors.
RecyclerView improves performance over ListView mainly by...
  • A. Loading all rows into memory at once
  • B. Caching every row to disk
  • C. Rendering entirely on the GPU
  • D. Recycling and reusing view holders as items scroll ✓
Correct answer: D. The ViewHolder pattern reuses off-screen views instead of inflating new ones.
In iOS, a retain cycle between two strongly-referencing objects is broken using...
  • A. Additional strong references
  • B. A weak or unowned reference ✓
  • C. Global variables
  • D. Force unwrapping
Correct answer: B. Making one reference weak/unowned breaks the strong reference cycle so ARC can deallocate.
In Flutter, calling setState() causes...
  • A. The widget to rebuild with new state ✓
  • B. The entire app to restart
  • C. An automatic network request
  • D. A full hot reload
Correct answer: A. setState marks the widget dirty so the framework rebuilds it with updated state.
A StatelessWidget differs from a StatefulWidget in Flutter in that it...
  • A. Cannot render any UI
  • B. Must use async operations
  • C. Has no mutable internal state that triggers rebuilds ✓
  • D. Holds a database connection
Correct answer: C. StatelessWidgets are immutable and rebuild only when their inputs change.
In React Native's old architecture, the 'bridge' is responsible for...
  • A. Rendering pixels directly
  • B. Asynchronous communication between JS and native modules ✓
  • C. Storing application state
  • D. Compiling Dart code
Correct answer: B. The bridge serializes async messages between the JavaScript and native threads.
Which Android Jetpack component survives configuration changes (like rotation) to retain UI data?
  • A. ViewModel ✓
  • B. Activity
  • C. A plain Fragment
  • D. View
Correct answer: A. ViewModel is scoped to survive configuration changes and outlives the Activity recreation.
In iOS Auto Layout, constraints define...
  • A. Animation timing curves
  • B. Memory limits per view
  • C. Thread priority
  • D. Relationships that determine view position and size ✓
Correct answer: D. Auto Layout constraints express spatial relationships the engine solves for layout.
To avoid ANR errors on Android, network calls should use...
  • A. Synchronous main-thread calls
  • B. Asynchronous background execution ✓
  • C. More UI widgets
  • D. A larger heap size
Correct answer: B. Network I/O must run off the main thread to keep the UI responsive.
The recommended way to store an OAuth access token securely in a mobile app is...
  • A. Platform secure storage (Android Keystore / iOS Keychain) ✓
  • B. Plain SharedPreferences or UserDefaults
  • C. Hardcoded in source code
  • D. A plaintext file in app storage
Correct answer: A. Keystore/Keychain provide hardware-backed encrypted storage for secrets.

Hard round 30 questions

A ViewModel launches `viewModelScope.launch { val a = async { fetchA() }; val b = async { fetchB() }; combine(a.await(), b.await()) }`. `fetchB()` throws. What happens?
  • A. Only `b.await()` throws; `a` keeps running and the parent coroutine survives, logging the error
  • B. The exception from `fetchB()` propagates, cancels the parent coroutine (and sibling `a`), and crashes unless a handler is installed on the scope ✓
  • C. `async` swallows the exception until `a.await()` is also called, so nothing happens
  • D. A `CoroutineExceptionHandler` on `async` catches it and resumes normally
Correct answer: B. Because these `async` builders inherit the regular `Job` of `viewModelScope`, a child failure propagates upward, cancelling the parent and sibling regardless of when `await()` is called.
A Compose list item recomposes on every scroll frame even when its data is unchanged. The item takes `List<Item>` and a `() -> Unit` lambda as parameters. What is the MOST likely root cause and fix?
  • A. `List<Item>` is inferred unstable, so the composable is never skippable; use `ImmutableList`/`@Immutable` or `kotlinx.collections.immutable` ✓
  • B. The lambda allocates each recomposition; wrapping it in `remember` fixes stability of the list too
  • C. `derivedStateOf` must wrap the list read to make it observable and skippable
  • D. Marking the item `@Composable @Stable` forces Compose to skip regardless of parameter stability
Correct answer: A. The Compose compiler treats `List` as unstable (it could be a mutable implementation), making the function non-skippable; using a provably-immutable collection type restores skippability.
You call `stateFlow.collect { }` inside a `Fragment.onViewCreated` using `lifecycleScope.launch { ... }` (not `repeatOnLifecycle`). What is the concrete bug?
  • A. Collection stops at `onStop` and correctly restarts at `onStart`, so it is safe
  • B. StateFlow is cold, so nothing is ever collected without `repeatOnLifecycle`
  • C. The coroutine keeps collecting while the Fragment is in the background and holds the destroyed View, wasting work and risking a leak ✓
  • D. `StateFlow` conflates emissions, so background collection is automatically paused
Correct answer: C. `lifecycleScope.launch` only cancels at `onDestroy`, so the collector stays active in the background updating a stopped/destroyed view; `repeatOnLifecycle(STARTED)` is what pauses and resumes it.
Two offline devices edit the same record's different fields while disconnected, then both sync. The backend must remain single source of truth and no user edit should be silently lost. Which strategy best satisfies this?
  • A. Last-write-wins by wall-clock timestamp on the whole record
  • B. Per-field merge / CRDT-style reconciliation on the server so non-conflicting field edits both survive ✓
  • C. Reject the later sync with a 409 and force the user to re-enter everything
  • D. Vector clocks that only detect conflicts but always discard the older sibling
Correct answer: B. Whole-record LWW loses one device's field edit; per-field (or CRDT) merge lets independent field changes coexist while the server stays authoritative for true conflicts.
In Swift, a `URLSession` completion closure captures `self` and stores the returned task in a `self.task` property. Even after the request finishes, the object leaks. Why, and what is the minimal fix?
  • A. `URLSession` is a singleton so it always retains delegates; switch to `.shared`
  • B. The closure strongly captures `self` while `self` retains the task via `self.task`, forming a retain cycle; use `[weak self]` in the capture list ✓
  • C. ARC cannot free `URLSessionTask`; call `task.cancel()` in `deinit`
  • D. Completion closures are always `@escaping` and leak by design; mark it non-escaping
Correct answer: B. `self` → `task` → closure → `self` is a strong reference cycle; capturing `[weak self]` breaks it so ARC can deallocate once the request completes.
Under Swift 6 strict concurrency, you have a mutable cache accessed from many `Task`s. Which primitive gives compile-time data-race safety with the least boilerplate?
  • A. A `class` guarded by a manual `NSLock` around every access
  • B. An `actor` wrapping the cache, so all mutable access is serialized and isolated ✓
  • C. A `DispatchQueue.sync` barrier on a concurrent queue
  • D. Marking the cache `@unchecked Sendable` and hoping callers serialize
Correct answer: B. An `actor` provides compiler-enforced isolation and serialized access to its mutable state, which is exactly what strict concurrency checking rewards, without manual locking.
A React Native (old architecture) screen janks when a native module returns a large payload consumed on scroll. Why does JSI/TurboModules fix it where the legacy bridge could not?
  • A. JSI adds more worker threads to the bridge queue so serialization is parallelized
  • B. The legacy bridge serializes all calls to JSON and batches them async over a single queue; JSI lets JS hold direct synchronous references to native objects, removing the serialization bottleneck ✓
  • C. TurboModules move all JS execution onto the UI thread, eliminating frame drops
  • D. Fabric compresses the JSON payload so it crosses the bridge faster
Correct answer: B. The old bridge's cost is asynchronous JSON serialization over one queue; JSI exposes native objects to the JS engine directly (synchronously, no JSON), which TurboModules/Fabric build on to remove that bottleneck.
An Android app is killed under memory pressure while a form is half-filled. On relaunch the user lands back with an empty form. `onSaveInstanceState` was implemented but data still lost. Which is the correct explanation?
  • A. `onSaveInstanceState` is only for config changes; process death also needs the saved Bundle to be restored in `onCreate`/`SavedStateHandle`, and large data exceeding Binder limits is dropped ✓
  • B. Process death never triggers `onSaveInstanceState`, so no state can ever be saved
  • C. `ViewModel` survives process death and should have held the form state
  • D. Restoration fails because `onRestoreInstanceState` runs before `onCreate`
Correct answer: A. `onSaveInstanceState` does fire before process death, but restored state must be read back (via Bundle/SavedStateHandle) and stay within the ~1MB Binder transaction limit or it is silently dropped; ViewModels do NOT survive process death.
A coroutine wrapped in `withContext(NonCancellable)` or doing a tight CPU loop `while(true){}` ignores `job.cancel()`. Why doesn't it stop, and what is the correct fix for the CPU-loop case?
  • A. Cancellation is cooperative; a busy loop never suspends or checks `isActive`, so add `ensureActive()`/`yield()` or check `isActive` in the loop ✓
  • B. `cancel()` only sets a flag for structured concurrency and never affects running code
  • C. Dispatchers.Default disables cancellation for performance
  • D. The loop needs `SupervisorJob` to become cancellable
Correct answer: A. Coroutine cancellation is cooperative and only takes effect at suspension/check points, so a non-suspending busy loop must explicitly call `yield()`/`ensureActive()` or test `isActive`.
You want a `Flow` that (a) has no initial value, (b) never replays to new subscribers, and (c) drops events if there are momentarily no collectors, for one-shot navigation events. Which construct fits?
  • A. `StateFlow` with an initial dummy value
  • B. `SharedFlow(replay = 0, extraBufferCapacity = 0, onBufferOverflow = SUSPEND)` — with an active collector, or `Channel` for strict single-consumer delivery ✓
  • C. `StateFlow(null)` mapped with `filterNotNull`
  • D. `SharedFlow(replay = 1)`
Correct answer: B. `replay = 0` prevents redelivery to late subscribers (StateFlow always replays its latest), matching one-shot event semantics; a `Channel` is the stricter single-consumer alternative.
In Swift ARC, which reference declaration breaks a strong reference cycle while safely becoming nil when the referent is deallocated?
  • A. strong
  • B. weak ✓
  • C. unowned with a non-optional
  • D. static
Correct answer: B. A weak reference does not increase the retain count and is automatically set to nil when the referent is deallocated, breaking cycles safely.
In the React Native New Architecture, what does Fabric primarily replace and improve?
  • A. The Metro bundler
  • B. The legacy UIManager rendering system, enabling synchronous, concurrent rendering ✓
  • C. The JavaScript engine only
  • D. The npm dependency resolver
Correct answer: B. Fabric is the new rendering system replacing the old UIManager, allowing synchronous layout and better concurrency via a C++ shadow tree.
In Android, why can a memory leak occur when a non-static inner class or long-lived callback holds a reference to an Activity?
  • A. Inner classes cannot access the outer class
  • B. The implicit reference to the Activity prevents it from being garbage-collected after it is destroyed ✓
  • C. The Activity is duplicated in memory automatically
  • D. Static classes always leak more than inner classes
Correct answer: B. A non-static inner class holds an implicit reference to its outer Activity; if a long-lived object retains it, the destroyed Activity can't be collected.
In Kotlin coroutines, what structured-concurrency guarantee does coroutineScope provide over launching in GlobalScope?
  • A. It runs all work on the IO dispatcher
  • B. It waits for all child coroutines and cancels siblings if one fails, tying lifetimes to the scope ✓
  • C. It never propagates exceptions
  • D. It disables cancellation entirely
Correct answer: B. coroutineScope enforces structured concurrency: it suspends until children complete and cancels remaining children if one throws, unlike leak-prone GlobalScope.
In iOS, why is dispatching a UIKit view update from a background thread problematic?
  • A. UIKit updates are thread-safe everywhere
  • B. UIKit is not thread-safe and UI updates must occur on the main thread, or you risk undefined behavior and crashes ✓
  • C. Background threads run faster and skip rendering
  • D. It only affects SwiftUI, not UIKit
Correct answer: B. UIKit is main-thread-confined; updating UI off the main thread causes race conditions, glitches, or crashes.
In Flutter, what is the purpose of a 'const' constructor on a widget for rendering performance?
  • A. It makes the widget mutable at runtime
  • B. It lets the framework canonicalize and reuse the widget instance, skipping unnecessary rebuilds ✓
  • C. It forces a full repaint every frame
  • D. It disables the widget's build method
Correct answer: B. const widgets are compile-time constants that Flutter can reuse and short-circuit during rebuilds, reducing widget tree churn.
When implementing certificate pinning to prevent MITM attacks, what is a critical operational risk to plan for?
  • A. It makes the app load faster than needed
  • B. Pinned certificates expire or rotate, which can break connectivity if the app isn't updated in time ✓
  • C. It permanently disables HTTPS
  • D. It only works on emulators
Correct answer: B. Pinning ties the app to specific certs/keys; when the server rotates certificates, un-updated apps lose connectivity, requiring backup pins and an update strategy.
On Android, what is the primary benefit of using an App Bundle (.aab) over a universal APK for Play Store distribution?
  • A. It encrypts all source code automatically
  • B. Google Play generates optimized, smaller APKs tailored to each device's density, ABI, and language ✓
  • C. It removes the need for signing
  • D. It disables Play Store review
Correct answer: B. The App Bundle lets Play's Dynamic Delivery serve device-specific split APKs, reducing download size versus a fat universal APK.
In SwiftUI, what does the @State property wrapper fundamentally provide for a view?
  • A. A globally shared singleton
  • B. A view-owned source of truth that triggers a re-render when its value changes ✓
  • C. Persistent disk storage across launches
  • D. A background thread executor
Correct answer: B. @State gives a view local, mutable state managed by SwiftUI; mutating it invalidates and re-renders the view body.
Why does frequent high-accuracy GPS most heavily impact battery, and what mitigates it?
  • A. GPS uses no power; the screen is the only drain
  • B. Continuous GPS keeps a power-hungry radio active; using lower accuracy, geofencing, or fused/batched location reduces drain ✓
  • C. Battery drain comes only from the CPU, not sensors
  • D. Disabling the network fully solves GPS drain
Correct answer: B. Continuous high-accuracy GPS keeps the power-intensive GNSS radio on; fused/low-power modes, geofencing, and batching cut battery use significantly.
In Android, transient UI state that must survive the process being killed for memory is best restored via...
  • A. onDestroy only
  • B. onSaveInstanceState / SavedStateHandle ✓
  • C. Static variables
  • D. The manifest file
Correct answer: B. The saved-state bundle (SavedStateHandle) persists small UI state across process death.
Swift's ARC frees an object when...
  • A. Its strong reference count reaches zero ✓
  • B. The app is closed
  • C. A garbage collector runs
  • D. A memory warning is fired
Correct answer: A. Swift has no GC; ARC deallocates an object the moment its strong count hits zero.
Flutter maintains three parallel trees named...
  • A. Widget, State, and Layout trees
  • B. DOM, Virtual DOM, and Render trees
  • C. Widget, Element, and RenderObject trees ✓
  • D. View, Model, and Controller trees
Correct answer: C. Widgets configure Elements, which manage RenderObjects that handle layout and painting.
React Native's new architecture replaces the async bridge with...
  • A. JSI enabling synchronous native calls (with Fabric/TurboModules) ✓
  • B. An embedded WebView
  • C. A Dart virtual machine
  • D. A Redux store
Correct answer: A. The JavaScript Interface (JSI) lets JS invoke native code synchronously, powering Fabric and TurboModules.
A common Android memory leak results from...
  • A. Using a ViewModel
  • B. Recycling views in a RecyclerView
  • C. Using structured coroutines
  • D. A static/long-lived object holding an Activity or Context reference ✓
Correct answer: D. A long-lived reference to an Activity prevents it from being garbage collected, leaking memory.
In iOS, capturing self strongly inside an escaping closure risks a retain cycle; the fix is...
  • A. A [strong self] capture
  • B. A [weak self] capture list ✓
  • C. Calling DispatchQueue.main.async
  • D. Force-unwrapping self
Correct answer: B. A [weak self] capture avoids the closure retaining self and creating a cycle.
Flutter's const constructors improve performance because...
  • A. They run on the GPU
  • B. They compile to native machine code
  • C. Identical const widgets are canonicalized and skip rebuild/reallocation ✓
  • D. They cache network responses
Correct answer: C. const widgets are compile-time constants reused across builds, avoiding rebuild work.
To render at 60fps, each frame must be produced within roughly...
  • A. 16.67 ms ✓
  • B. 100 ms
  • C. 1 second
  • D. 33 ms
Correct answer: A. 1000 ms divided by 60 frames is about 16.67 ms per frame.
In Android, coroutine work tied to a ViewModel should use ___ so it cancels when the ViewModel is cleared.
  • A. GlobalScope
  • B. viewModelScope ✓
  • C. A raw Thread
  • D. The Activity's lifecycleScope
Correct answer: B. viewModelScope is automatically cancelled in onCleared, preventing leaks.
iOS's Main Thread Checker flags UIKit calls made off the main thread because UIKit is...
  • A. Too slow when run in the background
  • B. GPU-bound and cannot use threads
  • C. Deprecated in modern iOS
  • D. Not thread-safe and must be updated on the main thread ✓
Correct answer: D. UIKit is not thread-safe, so all UI updates must occur on the main thread.

Prep for another role

Questions are original, written and independently verified for HireHire's role interview quizzes. They reflect the kind of knowledge Mobile App Developer interviews test, not any specific company's questions. HireHire maps live tech & IT jobs across India, updated regularly. Last updated: August 2026.