Skip to main content

Mobile engineer system design interview questions

12 questions on system design for mobile engineer candidates. Expect prompts such as “Design an offline-first mobile app” and “System design: real-time chat app for mobile”, each with a worked answer outline and the follow-ups interviewers push on.

Questions

Showing 1 to 12 of 12 system design questions.

As asked

Design the data architecture for an offline-first mobile app that syncs with a server when connected. Cover conflict resolution and the user experience.

Sample answer outline

Local store (SQLite, Realm, WatermelonDB) as the source of truth for reads. Writes go to the local store first and queue for sync. Sync protocol: a sync log of operations or a CRDT, sent in batches with a server-assigned version. Conflict resolution: last-write-wins is simplest and sometimes wrong (for collaborative documents use a CRDT, for inventory use server-authoritative reconciliation). UX: show pending state on records that have not synced, give users a way to see and resolve conflicts, never silently overwrite. Discuss the cold-start sync for a new device and the partial-sync case.

Expect these follow-ups

  • What if a user deletes a record offline while another user edits it online?
  • How would you handle media (photos, video) in the same sync framework?
  • When is offline-first too expensive to bother with?
offlinesyncmobile-architecture

As asked

Design the mobile client architecture for a WhatsApp-style chat app. Cover the connection strategy (WebSocket vs polling), local message store, message ordering, unread counts, and how you handle the app coming back from the background with potentially thousands of missed messages.

Sample answer outline

WebSocket (or MQTT) maintained by a foreground service (Android) or background URLSession on iOS. Local SQLite store with Room/Core Data holding messages by conversationId and cursor/timestamp. On foreground: resume missed messages via REST catch-up API using last seen message ID, not fetching every message via WebSocket to avoid backpressure. Unread counts maintained locally and synced from server on reconnect. Deduplication by server-assigned message ID.

Expect these follow-ups

  • How would you handle end-to-end encryption key management on device?
  • How do you ensure message ordering when a user sends multiple messages quickly on a flaky network?
system-designnetworkingoffline-firstsqliteandroid

As asked

Design the backend for sending push notifications to a 10M user mobile app. Cover device registration, fan-out, and delivery feedback.

Sample answer outline

Device registration: store device tokens (APNs, FCM) keyed by user and device. Tokens rotate, so handle the rotation flow and the unregister-on-uninstall case (APNs feedback service, FCM unregistered errors). Fan-out: when a notification is triggered, look up all devices for the user (or audience), batch by provider, send via APNs/FCM. Rate-limit per device. Delivery feedback: providers return per-token status; record bad tokens for cleanup. Schedule and dedupe to avoid sending the same notification twice on retries. Provide a templating layer and per-user notification preferences.

Expect these follow-ups

  • How do you handle a token that returns 'not registered'?
  • What is your strategy for a 10M user broadcast?
  • How do you A/B test notification copy without spamming users?
push-notificationsapnsfcm

As asked

Design offline support for a React Native field app where users create inspections without network access and sync them later. How do you handle conflicts and retries?

Sample answer outline

Use a local durable store such as SQLite or WatermelonDB for inspection records and an outbox table for pending mutations. Each mutation needs an idempotency key so retries after app restarts or flaky networks do not duplicate server state. Conflict handling depends on domain rules: last-write-wins is rarely acceptable for inspections, so prefer field-level merge, server validation, or explicit user resolution. Sync should be resumable, ordered where required, and observable through local status per record. Weak answers hide conflict resolution behind a generic queue and never define the server contract.

Expect these follow-ups

  • How do you sync attached photos without exhausting device storage?
  • What does the server need to store for idempotency?
  • How do you test a week of offline edits?
offlinesyncmobile-data

As asked

Design the mobile-side architecture for an Instagram-style feed. Focus on image preloading, the local feed cache, pull-to-refresh vs append, pagination cursor design, and how you avoid showing stale content while also minimizing network usage.

Sample answer outline

Paginated REST API with cursor-based pagination. Local disk cache keyed by post ID. Feed cache stores ordered list of post IDs; stale if older than N minutes. On pull-to-refresh, fetch latest page and prepend new items; on scroll-to-bottom, append next page. Image preloading: prefetch next 3 to 5 images via URLSession background download. Placeholder strategy (blurhash or average color) while images load. Candidate should discuss cache invalidation when a liked photo's count changes.

Expect these follow-ups

  • How would you design the local cache to survive an app update without data loss?
  • How would you handle videos in the feed differently from images in terms of preloading and memory?
system-designiosandroidcachingimage-loading

As asked

Design an on-device analytics event pipeline that buffers events locally, batches them, and ships them to the server reliably, even if the app crashes or the network is down for hours.

Sample answer outline

Write every event synchronously to a local SQLite queue table with a timestamp and status (pending/sent). A background process batches up to 100 events into a JSON payload and POSTs them. On success, delete the rows. On failure, retry with exponential backoff. On crash, rows remain pending. Add a max-age eviction (drop events older than 7 days) to bound storage. On iOS, use BGProcessingTask or a background URLSession to flush when the app is not foreground.

Expect these follow-ups

  • How do you prevent duplicate event delivery if the server receives the batch but the ACK is lost?
  • How would you order events correctly if the device clock is skewed?
system-designanalyticssqliteoffline-firstbackground-execution

As asked

Design the complete authentication flow for an app that uses Face ID / fingerprint as the primary login, falls back to PIN, and stores a short-lived access token and a long-lived refresh token on device.

Sample answer outline

Access token stored in Keychain (afterFirstUnlock / Encrypted SharedPreferences). Refresh token stored with biometric access control so re-authentication is required if the token is used after a timeout. On app foreground, check token expiry; if expired but refresh token valid, silently refresh. If biometric changes (new fingerprint enrolled), iOS/Android invalidate the biometric-protected Keychain item, requiring re-login. LAContext / BiometricPrompt for the prompt; handle LAErrorUserFallback for PIN.

Expect these follow-ups

  • How would you detect that the device's biometric database has changed and force re-enrollment?
  • What happens to a Secure Enclave key if the user wipes their fingerprints?
system-designsecurityauthenticationkeychainbiometrics

As asked

Design an A/B testing system for a mobile app that can change which variant a user sees, survive app restarts without flickering, and report conversion events back to the experiment system.

Sample answer outline

On first launch, fetch experiment assignments from the server; cache them locally (UserDefaults/SharedPreferences) keyed by user ID and experiment ID. On subsequent launches, serve from cache immediately (no flicker) and refresh in the background. Assignment is deterministic on user ID so the same user always gets the same variant. Conversion events are queued in the local analytics pipeline and sent with the experiment ID and variant as metadata. Handle experiment deactivation by clearing the local cache entry.

Expect these follow-ups

  • How do you avoid showing a user both variants if they use the app on two devices?
  • How do you handle feature flags that need to turn off instantly due to a production incident?
system-designab-testingfeature-flagsanalyticsmobile

As asked

Design the local-first data layer for a shared to-do list app where multiple users can edit the same list offline and merge changes when they reconnect. What data structure would you choose on-device and how would merges work?

Sample answer outline

CRDT (Conflict-free Replicated Data Type): a Last-Write-Wins Register for individual field updates, or an OR-Set for the list itself so concurrent adds never conflict and concurrent deletes from different users are resolved by the OR-Set semantics. On device: store the CRDT state in SQLite. Sync protocol: exchange vector clocks or operation logs since last sync; merge locally. Candidate should also explain a simpler server-wins fallback if CRDTs are overkill for the use case.

Expect these follow-ups

  • How would you handle the case where the same item is renamed by two users offline?
  • What serialization format would you use to transmit the CRDT deltas efficiently?
system-designoffline-firstcrdtsyncsqlite

As asked

You need to build the map screen for a hiking app that works in areas with no signal. Design how you download, store, and serve map tiles on device, and how you keep the tile cache from growing unbounded.

Sample answer outline

Use a tile pyramid structure (zoom/x/y) stored as files on disk with an SQLite manifest. Download tiles for the selected region before the trip using a background URLSession to survive backgrounding. LRU eviction on the disk cache, but never evict user-downloaded regions. Cache directory in a directory that is not backed up to iCloud/cloud. Tile rendering: use MapKit's MKTileOverlay on iOS or a custom TileProvider on Android with Mapbox/Google Maps. Progress reporting via background URLSession delegate.

Expect these follow-ups

  • How large is a typical map tile download for a 10km x 10km hiking area at all useful zoom levels?
  • How would you handle corrupted tiles that cause the map to show blank squares?
system-designmapsofflinecachingiosandroid

As asked

Design the buffering and quality-selection strategy for a video player in a mobile app. How does it decide when to switch quality levels, how large should the forward buffer be, and how do you handle going offline mid-playback?

Sample answer outline

HLS (iOS) or DASH (Android) adaptive streaming. AVPlayer / ExoPlayer handle ABR algorithm internally; candidate should explain the principles: measure download throughput, estimate bandwidth, select the highest bitrate that can be sustained. Forward buffer: 10 to 30 seconds is typical. On network loss, AVPlayer/ExoPlayer stall; show spinner. For offline, pre-download an HLS variant stream using AVAssetDownloadTask or ExoPlayer's DownloadManager to the cache directory.

Expect these follow-ups

  • How would you implement a skip-intro feature that seeks to a specific timecode before buffering?
  • What DRM technology would you use to protect content, and what device attestation does it require?
system-designvideostreamingiosandroid

As asked

Walk me through the integration design for accepting Apple Pay or Google Pay in a checkout screen, including what your server must do, what the device does, and how you handle declined payments and partial network failures.

Sample answer outline

Server creates a payment session (Stripe, Braintree, or direct processor). Client calls PKPaymentAuthorizationViewController (iOS) or Google Pay API; on authorization, receives an encrypted PKPaymentToken. Client sends token to server; server decrypts and charges. Declined: the authorization delegate receives a failure, show retry UI. Network failure between client and server: idempotency key on the charge request so a retry does not double-charge. Never log the payment token.

Expect these follow-ups

  • How do you display the correct payment methods based on the user's wallet contents without knowing which cards they have?
  • How does 3D Secure interact with Apple Pay's authentication model?
system-designpaymentsapple-paygoogle-paysecurity