1. Home
  2. Insights
  3. How to make your app work offline

Technology

How to make your app work offline

Zahid Younis
Co-founder and CTO · · 4 min read

An offline-first app stores the data people need on the device, lets them keep working without signal, queues their changes and syncs safely when the connection returns, resolving any conflicts. It must be designed in from the start, because it changes how data is stored, synced and secured.

Field engineers in basements, cleaners in tower blocks, nurses in hospital corridors and shoppers on trains all lose signal. Apps that stop working in those moments lose trust quickly. We design offline support into staff and field apps as a matter of course. For field use cases, see field service apps.

Online, offline-tolerant or offline-first?

Level What happens without signal Typical use
Online only App shows an error Simple content apps
Offline-tolerant Recently viewed content cached; actions blocked Shopping, news
Offline-first Most features work; changes sync later Field service, inspections, healthcare, staff apps

Decide which level each part of your app needs. Often, only certain journeys must work fully offline.

How offline-first works

  1. Local database. Data the user needs is stored on the device, such as today's jobs, forms and reference data.
  2. Local changes. Edits, check-ins, photos and form submissions are saved locally first.
  3. Sync queue. Changes are queued and sent to the server when a connection is available.
  4. Server updates. New and changed data from the server is downloaded and merged.
  5. Conflict handling. If the same record changed in two places, rules decide what wins.
  6. Status for users. Clear indicators show what is saved, waiting or synced.

Handling conflicts

Conflicts are the hardest part. Common approaches:

Approach How it works Good for
Last write wins The most recent change replaces older ones Simple fields where loss is acceptable
Field-level merge Changes to different fields are combined Forms edited by several people
Server decides Business rules on the server resolve conflicts Bookings, stock, money
Ask the user Show both versions and let a person choose Important documents and notes

Write conflict rules for each type of data during design, not after bugs appear.

Photos and large files

Photos are often the biggest challenge:

  • Compress images on the device.
  • Upload in the background when on Wi-Fi or good signal.
  • Retry failed uploads automatically.
  • Show progress, and never delete a local photo until upload is confirmed.

Security for offline data

Data on the device needs protection:

  • Encrypt local databases containing personal or sensitive data.
  • Store tokens in the iOS Keychain or Android Keystore.
  • Limit how much data is stored and for how long.
  • Wipe local data on logout and support remote sign-out for lost devices.

See our mobile app security checklist.

Technology choices

Options include platform databases such as SQLite-based libraries, Core Data or SwiftData on iOS and Room on Android, cross-platform stores, and backend platforms with built-in offline sync. Firebase offers offline persistence for some use cases. See Firebase vs Supabase vs a custom backend. The right choice depends on data volume, conflict rules and your backend.

Testing offline behaviour

Offline bugs are easy to miss in an office with perfect Wi-Fi. Test:

  • Airplane mode during each key journey.
  • Weak and intermittent connections.
  • Long periods offline with many changes.
  • Two devices editing the same data.
  • App closed and reopened while offline.
  • Low storage on the device.

See app testing explained.

Use cases

  • Field service and cleaning. Jobs, checklists, photos and sign-off without signal.
  • Inspections. Forms in basements, plant rooms and remote sites.
  • Healthcare and care. Notes and visits recorded wherever staff are.
  • Retail staff apps. Stock checks in warehouses with poor coverage.
  • Events. Tickets and schedules at crowded venues.

Cost impact

Offline-first support typically adds £5,000 to £35,000 to an app, depending on how much data, how many conflict rules and how many journeys must work offline. Adding it later costs more, because data storage and sync shape the whole app. See app feature costs.

A worked example: site inspections

An inspection company's surveyors work in basements, plant rooms and rural sites with no signal. The offline-first app:

  1. Downloads each day's jobs, previous reports and checklists each morning.
  2. Lets surveyors complete forms, take photos and capture signatures with no connection.
  3. Saves everything in an encrypted local database.
  4. Queues uploads and syncs automatically when signal returns, photos last.
  5. Shows a clear status: saved on device, syncing, or synced.

Conflicts are rare because each job belongs to one surveyor, and the office cannot edit a job while it is in progress. Designing ownership like this avoids most of the complexity of conflict resolution.

Questions to ask your developer

  • What exactly must work offline, and for how long?
  • How will we handle conflicting edits?
  • What happens to data if a phone is lost before syncing?
  • How will users know their work is safe?
  • How will we test poor and intermittent connections?

The short version

  • Decide which journeys must work offline.
  • Store data locally, queue changes and sync safely.
  • Define conflict rules per type of data.
  • Encrypt local data and handle photos carefully.
  • Test offline scenarios deliberately.

Need an app that works anywhere? Book a call.

Frequently asked questions

Can any app work offline?

Most can, at least partly. Features that need live data, such as payments or live availability, need a connection or a careful fallback.

Does offline mode use a lot of storage?

It depends on the data. Good design stores only what users need and clears old data.

Is offline-first more expensive?

Yes, somewhat, but far cheaper than adding it later or losing users in poor signal areas.

Can a web app work offline?

Yes, to a degree, using service workers. See PWA vs native app.

Can a cross-platform app work offline?

Yes. Flutter and React Native apps can use local databases and background sync just like native apps.

Planning an app?

Talk it through with one of our co-founders. 30 minutes, no pressure.

Book a call

This website stores cookies on your computer. Cookie Policy