Skip to content

Hard Mobile App Development Interview Questions

41 hard questions with answers. Design, trade-off and deep-dive questions asked for senior roles and at top product companies.

Topics in the hard set

Mobile Backend, APIs and Firebase: 8 Testing, Performance and CI/CD: 7 Flutter State Management and Architecture: 6 React Native Navigation, State and Native Modules: 6 App Store and Play Store Publishing: 6 Dart and Flutter Basics: 3 React Native Core: 3 Mobile Development Fundamentals: 2
Solved — hardStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
3 questions free Unlock the rest in seconds
01

Users say the app does not work properly on foldable phones and tablets. What do you check?

Save to ▾
Show answer
Check whether orientation is locked, layouts use fixed widths, and screens assume phone dimensions. Make layouts adapt by width breakpoints with two-pane layouts on wide screens, handle configuration and size changes without losing state, and avoid hardcoding aspect ratios. Recent Android versions ignore orientation locks on large screens, so locking is no longer a fix. Test with resizable emulators, foldable postures and split-screen mode.
02

How do you think about mobile system design for a chat feature?

Save to ▾
Show answer
Start with requirements: one-to-one or group, media, read receipts, offline sending. The client keeps a local database as source of truth, shows sent messages instantly with a pending status, and syncs over a WebSocket while foregrounded, using push notifications in background. Handle reconnection, ordering by server timestamps, pagination of history, and retries with idempotent message IDs. Encrypt sensitive data and limit media size before upload.
03

Explain the three trees in Flutter: widget, element and render object.

Save to ▾
Show answer
Widgets are lightweight, immutable descriptions of UI created on every build. Elements are the mounted instances that hold a widget's position in the tree and link to State; they are reused when a new widget of the same type and key appears. RenderObjects handle layout, painting and hit testing, and are expensive, so Flutter updates them only when needed. This design makes frequent rebuilds cheap.
04

What are records and patterns in Dart 3?

Save to ▾
Show answer
Records are anonymous, immutable aggregates like (String, int) or ({String name, int age}), useful for returning multiple values without creating a class. Patterns let you destructure values and match shapes in switch expressions and if-case statements. Combined with sealed classes, switch can be exhaustive, so the compiler warns when a case is missing. They make state handling and parsing code shorter and safer.
05

How does Flutter's layout rule of constraints go down, sizes go up work?

Save to ▾
Show answer
A parent passes constraints, minimum and maximum width and height, to each child. The child chooses its size within those constraints and reports it up, then the parent positions the child. A widget cannot choose a size outside its constraints, which explains why a Container with width 100 may still fill the screen if forced by tight constraints. Understanding this rule solves most overflow and unbounded constraint errors.
06

How do you avoid unnecessary rebuilds in a Flutter app with state management?

Save to ▾
Show answer
Rebuild only what depends on the changed data. Use selectors such as context.select, ref.watch(provider.select(...)) or BlocSelector to listen to one field, split big widgets into smaller ones, and use const constructors. Keep state objects immutable with proper equality so identical states do not trigger rebuilds. Use Flutter DevTools rebuild tracking to find widgets that rebuild more often than expected.
07

A Bloc emits the same state twice and the UI does not update. Why?

Save to ▾
Show answer
Bloc and Cubit skip emitting a state that is equal to the current one. If you mutate a list inside the existing state and emit the same object, equality holds and nothing rebuilds. Always emit a new state with copied collections, for example state.copyWith(items: [...state.items, newItem]), and implement equality with Equatable or freezed. Avoid mutable fields in state classes.
08

How do you handle a logout that must clear all user data across the app?

Save to ▾
Show answer
Centralise session state in an auth provider or bloc that other state depends on. On logout, clear secure tokens, wipe local databases or caches for that user, reset or invalidate dependent providers, for example by Riverpod providers watching the auth state, and redirect with the router guard to login. Cancel ongoing requests and background jobs. Test that no previous user's data appears after logging in as someone else.
09

The app needs a bottom navigation bar where each tab keeps its own navigation history. How do you implement it?

Save to ▾
Show answer
Use go_router's StatefulShellRoute.indexedStack, which creates a separate navigator branch for each tab and keeps their stacks alive with an IndexedStack. The scaffold shows a NavigationBar and switches branches with navigationShell.goBranch(index). This preserves scroll positions and nested pages when switching tabs, and deep links can open a specific tab and page. Handle tapping the active tab to pop to its root.
10

You are designing a large Flutter app for a bank with 30 developers. How do you structure it?

Save to ▾
Show answer
Split the app into feature packages in a monorepo managed with Melos or pub workspaces, plus core packages for networking, design system, analytics and security. Pick one state management approach, such as Bloc for strict traceability, with clear layer boundaries. Use code generation consistently, enforce lints and architecture tests in CI, and assign feature ownership. Add integration tests for critical journeys and strict security reviews for storage and network code.
11

What is the React Native New Architecture?

Save to ▾
Show answer
The New Architecture, enabled by default since React Native 0.76, replaces the old asynchronous bridge. JSI lets JavaScript hold references to C++ objects and call native methods synchronously. Fabric is the new renderer supporting concurrent React features and synchronous layout. TurboModules load native modules lazily with typed interfaces generated by Codegen. Bridgeless mode removes the bridge entirely. Together they improve startup, responsiveness and type safety.
12

How do native modules work, and when do you write one?

Save to ▾
Show answer
A native module exposes platform code written in Kotlin, Java, Swift or Objective-C to JavaScript. With the New Architecture, you define a typed TypeScript spec, Codegen generates interfaces, and the TurboModule implements them natively. Expo Modules API offers a simpler way using Swift and Kotlin. You write one when no library supports a needed SDK or device feature, such as a specific payment or biometric SDK.
13

After upgrading React Native, a third-party library breaks on the New Architecture. What do you do?

Save to ▾
Show answer
Check the library's documentation and the React Native directory for New Architecture support, and update to the latest version, since many libraries added support. The interop layer often lets old-architecture modules work, so read the error carefully. If unsupported, look for a maintained alternative, contribute a fix or patch with patch-package, or temporarily keep the old architecture only if your version still allows it, while planning a replacement.
14

Users lose their place in a long Flutter form when they get a phone call and the app is killed in background. How do you fix it?

Save to ▾
Show answer
The operating system may kill the app process in background, and in-memory state is lost. Save draft form data to local storage, such as shared_preferences, Hive or a SQLite table, as the user types with a short debounce, and restore it when the screen opens. Flutter's RestorationMixin and restorationScopeId can restore simple UI state like scroll position and text fields. Clear the draft after successful submission.
15

How do animations work in React Native and why use Reanimated?

Save to ▾
Show answer
The built-in Animated API can run animations on the native thread with useNativeDriver for transform and opacity, but not for layout properties. Reanimated runs animation logic in worklets on the UI thread, so animations stay smooth even if JavaScript is busy, and supports gestures, layout animations and shared element transitions. Combined with react-native-gesture-handler, it is the standard for complex interactive animations.
16

What are the JS thread and UI thread in React Native and why do they matter?

Save to ▾
Show answer
JavaScript, including React rendering and business logic, runs on the JS thread, while the native UI thread draws views and handles touches. If the JS thread is busy with heavy computation or large re-renders, taps and JS-driven animations lag even though the UI thread is free. Keep heavy work off the JS thread, move animations to the UI thread with Reanimated, and split expensive tasks into smaller chunks.
17

How do you write a Fabric native component or use one in React Native?

Save to ▾
Show answer
A Fabric component wraps a native view for use in JavaScript. You write a TypeScript spec using codegenNativeComponent with typed props, run Codegen to generate C++ and platform interfaces, and implement the view in Kotlin and Objective-C or Swift. With Expo, the Expo Modules API lets you define a native view in Kotlin and Swift with less boilerplate. Use this for maps, video players or custom SDK views.
18

The JS bundle grew large and startup is slow. How do you reduce startup time in React Native?

Save to ▾
Show answer
Measure time to interactive on a release build first. Make sure Hermes is enabled, remove unused dependencies and heavy libraries like full date or icon packs, and lazy-load screens and modules with inline requires. Defer non-critical SDK initialisation until after the first screen. Keep the initial screen light, avoid large synchronous storage reads at startup, and use the New Architecture for faster native module loading.
19

An animation stutters whenever the screen fetches data. How do you fix it?

Save to ▾
Show answer
The animation likely runs on the JS thread, and data parsing or re-renders block it. Move the animation to the UI thread with Reanimated or Animated with useNativeDriver, reduce the work done when data arrives by memoising components and normalising state updates, and delay heavy processing with InteractionManager or requestIdleCallback-style scheduling until the animation finishes. Profile with React Native DevTools to confirm.
20

Your app needs a third-party SDK that has only native Android and iOS libraries. How do you integrate it in React Native?

Save to ▾
Show answer
First check whether a maintained wrapper package exists. If not, create a native module using the Expo Modules API or a TurboModule with a typed spec, add the SDK through Gradle and CocoaPods or Swift Package Manager, and expose a small JavaScript API with promises and events. If using Expo, write a config plugin to apply native setup during prebuild. Test on both platforms and document the setup.
21

How do you design an offline-first mobile app?

Save to ▾
Show answer
Store data in a local database and render the UI from it, so the app works without network. Queue user changes locally with a pending status and sync them in the background when connectivity returns, using retries with backoff. Fetch server changes using timestamps or sync tokens and merge them. Resolve conflicts with clear rules like last write wins or server authority, and show sync status to users.
22

How do you integrate a payment gateway in a mobile app safely?

Save to ▾
Show answer
Create the order on your backend with the amount, get an order ID, and open the gateway's SDK checkout in the app with that ID. After payment, the SDK returns a payment ID and signature, which the app sends to the backend to verify with the secret key before marking the order paid. Rely on server-side webhooks as the final truth. Never keep secret keys in the app or trust client-side success alone.
23

Write a React Native function that uploads an image with progress using Expo FileSystem.

Save to ▾
Show answer
import * as FileSystem from 'expo-file-system'; export async function uploadImage(uri, token, onProgress) { const task = FileSystem.createUploadTask( 'https://api.example.com/upload', uri, { httpMethod: 'POST', uploadType: FileSystem.FileSystemUploadType.MULTIPART, fieldName: 'file', headers: { Authorization: `Bearer ${token}` }, }, ({ totalBytesSent, totalBytesExpectedToSend }) => onProgress(totalBytesSent / totalBytesExpectedToSend) ); const res = await task.uploadAsync(); if (res.status !== 200) throw new Error('Upload failed'); return JSON.parse(res.body); }
24

Users get logged out randomly. The access token refresh seems to fail sometimes. What could be wrong?

Save to ▾
Show answer
A common cause is a race condition: several requests receive 401 at once and each triggers a refresh, so later refreshes use an already rotated refresh token and fail, logging the user out. Fix it by allowing only one refresh at a time and queueing other requests until it completes, then retrying them with the new token. Also check device clock issues, token expiry settings and secure storage read failures.
25

The Firestore bill is growing fast because of too many reads. How do you reduce it?

Save to ▾
Show answer
Find screens that listen to large collections or re-read data on every rebuild. Paginate queries with limits, listen only to needed documents, detach listeners when screens close, and avoid starting listeners inside build methods. Denormalise data to reduce reads per screen, cache data locally with offline persistence, and use aggregate count queries instead of reading all documents to count. Monitor usage per collection.
26

A payment shows success in the app but the order is not created on the server. How would you fix the flow?

Save to ▾
Show answer
The app is probably treating the SDK's success callback as final and the verification call failed or was never sent, for example when the app was killed. Make the backend the source of truth: verify payments with the gateway's signature on the server and use webhooks to update orders even if the app never reports back. The app should poll order status after payment and show a pending state until confirmed.
27

Your app must show live delivery partner location on a map. How would you design it?

Save to ▾
Show answer
The partner app sends location updates every few seconds through a foreground service to the backend, which publishes them to a real-time channel like WebSockets or Firestore documents. The customer app subscribes only while the tracking screen is open and smoothly animates the marker between points. Throttle updates, reconnect on network changes, and fall back to polling. Stop tracking when the delivery completes to save battery.
28

Two users editing the same shared list offline create conflicting changes. How do you resolve conflicts?

Save to ▾
Show answer
Choose a strategy based on data. Last write wins, using server timestamps, is simple but can lose edits. Field-level merging keeps non-conflicting changes. For lists, treat each item as a separate record with its own version so edits rarely clash. For collaborative content, CRDT-based approaches merge automatically. Always let the server decide final order, and show users when their change was overwritten.
29

What is Impeller in Flutter?

Save to ▾
Show answer
Impeller is Flutter's rendering engine that replaced Skia as the default on iOS and on modern Android devices. It precompiles a smaller set of shaders at build time instead of compiling them at runtime, which removes the shader compilation jank that first-time animations used to cause. It provides more predictable frame times. Developers rarely interact with it directly, but they should test on real devices when upgrading Flutter.
30

A Flutter animation is smooth on a flagship phone but janky on a budget phone. How do you fix it?

Save to ▾
Show answer
Profile on the budget device in profile mode. Common fixes: wrap frequently repainting areas in RepaintBoundary, avoid expensive effects like Opacity on large subtrees, clipping and shadows in scrolling lists, use AnimatedBuilder with child so static parts do not rebuild, precache images and decode them at display size, and move heavy computation to isolates. Reduce animation complexity on low-end devices if needed.
31

The app takes six seconds to start on low-end phones. How do you improve it?

Save to ▾
Show answer
Measure cold start on a release or profile build and trace what runs before the first frame. Defer non-critical SDK initialisation such as analytics and ads, avoid large synchronous storage reads and network calls before showing UI, load the first screen with cached data, and lazy-load other features. In Flutter, keep main() light; in React Native, use Hermes and inline requires. Use a native splash screen to avoid a blank screen.
32

QA reports the app becomes slower the longer it is used. How do you investigate?

Save to ▾
Show answer
This suggests a memory leak or growing work. Reproduce by repeating a flow many times while profiling memory and CPU. Look for listeners, timers or subscriptions that accumulate, caches without limits, lists that keep growing, or screens kept in the navigation stack. Fix by disposing resources, limiting cache sizes and replacing screens instead of pushing endlessly. Confirm memory returns to baseline after fixes.
33

How would you set quality gates before a mobile release?

Save to ▾
Show answer
Define clear criteria: all automated tests pass, no open critical or high bugs, crash-free rate in beta above an agreed threshold like 99.5 percent, performance budgets for startup time and app size met, accessibility checks on new screens, and security review for sensitive changes. Run smoke tests on the release build on real devices. Release with a staged rollout and monitor metrics before expanding.
34

Tell me about a bug that was hard to reproduce and how you solved it.

Save to ▾
Show answer
Situation: some users reported a blank screen after login, but no one on the team could reproduce it. Task: find the cause. Action: I added breadcrumb logs and non-fatal error reports around the login flow, and found it happened when the device clock was wrong, making tokens appear expired. I changed expiry checks to rely on server responses. Result: reports stopped, and we kept the breadcrumbs for future debugging.
35

What is a performance budget and how do you enforce it?

Save to ▾
Show answer
A performance budget sets limits on metrics like cold start time, app download size, frame rendering time and memory usage. Enforce it by measuring in CI, for example tracking release build size per pull request and running startup benchmarks on a reference device, and failing or flagging builds that exceed limits. Budgets make performance a shared responsibility rather than something fixed only after users complain.
36

The Play Store flagged your app because a third-party SDK collects data not declared in the data safety form. How do you handle it?

Save to ▾
Show answer
Identify the SDK and what it collects using its documentation and the Play SDK Index. Update the data safety form to declare that data accurately, or configure the SDK to stop collecting it, or replace it if its behaviour is unacceptable. Update the privacy policy too. Then submit a new build if code changed. Keep an inventory of SDKs and their data practices to avoid future surprises.
37

A critical bug reaches production in a React Native app. How do you fix it quickly?

Save to ▾
Show answer
If the bug is in JavaScript, fix it, test on a preview channel, and publish an over-the-air update to production with a staged rollout, keeping it compatible with the current runtime version. If it needs native changes, build a hotfix release, submit it, and request expedited review on iOS if justified. Meanwhile disable the feature with a remote config flag if possible, and halt the store rollout.
38

Your company wants to publish the same app for five white-label clients. How do you manage builds and store listings?

Save to ▾
Show answer
Keep one codebase and create a configuration per client with app ID, name, icons, colours, API base URL and feature flags, using Android flavours and iOS targets or schemes, or dynamic Expo app config. Automate builds for each client in CI with fastlane or EAS. Each client usually needs its own store account or listing, so document signing keys and access per client and automate metadata uploads.
39

An over-the-air update crashed the app for users on an older native build. What went wrong and how do you prevent it?

Save to ▾
Show answer
The update probably used a native module or API that the older binary did not have, so JavaScript called missing native code. Prevent this by setting runtime versions tied to native code fingerprints, so updates only reach compatible builds. Roll out updates gradually, monitor crashes per update ID, and keep a rollback by republishing the previous update. Test updates on the oldest supported build before release.
40

How would you plan a staged rollout for a major redesign?

Save to ▾
Show answer
Release to internal testers and beta users first and collect feedback. Then roll out to 5 percent of production users, monitoring crash-free rate, ANRs, key conversion metrics and reviews for a few days, before moving to 20, 50 and 100 percent. Keep the redesign behind a remote flag to switch back without a release. Define rollback criteria in advance and communicate the plan to support teams.
41

How do you automate store submissions with fastlane?

Save to ▾
Show answer
fastlane defines lanes in a Fastfile, such as beta and release. A lane can increment build numbers, build the app with gradle or gym, sign with match, which stores iOS certificates encrypted in a private repository, upload to TestFlight with pilot or Play testing tracks with supply, and upload metadata and screenshots. Running lanes from CI makes releases repeatable and removes manual steps on a developer's machine.

Frequently asked questions

Who should practise hard Mobile App Development questions?

Candidates targeting senior roles or top product companies, and anyone who finds the medium set easy.

How should I practise these?

Answer each question aloud before opening the answer, mark it as solved only when your answer matches the key idea, and save misses to Last-Minute Revision.

Other difficulty levels