Skip to content
RED SAGSkills
mediumMobile App Developer interview question

How would you add offline support to an app that currently only works online?

What the interviewer wants to hear

  • Local database as the source of truth (Room, SwiftData, SQLite)
  • Repository syncs between network and local store
  • Queue writes made offline and send them later with background work
  • Handle conflicts and failed syncs
  • Show users sync status and stale data clearly

Model answer

I would move to an offline-first design. First I add a local database such as Room on Android or SwiftData on iOS, and make it the single source of truth: the UI observes the database, not the API. A repository fetches from the network when possible and writes results into the database, so screens update automatically. For writes, I save the change locally right away, mark it as pending, and put it in a sync queue. A background job, like WorkManager or BGTaskScheduler, sends pending changes when the network is back, with retries. On the server side I need version numbers to detect conflicts and a clear merge rule. In the UI I show when data was last updated and which items are not synced yet.

Can you answer it under time pressure?

Take a timed medium round and get scored on every answer.

Start mock interview

More medium Mobile App Developer questions