Applies to: Phone & web
How MileLedger works offline
MileLedger is built on a local-first architecture. Your phone stores drives and expenses on the device using SwiftData, so you can record and review data without an internet connection. Sync to Firebase — and the web app — requires connectivity and the app to be in the foreground.
What works offline on phone
Recording drives: automatic tracking and manual drive entry both work without an internet connection. Drives are saved to local SwiftData storage on the device immediately.
Logging expenses: if you are signed in with Google, you can log expenses offline. They are saved locally and sync to Firebase the next time you have an internet connection and the app is in the foreground.
Browsing drives and expenses: the full Drives and Expenses history stored on the device is available offline.
Viewing reports: the Reports tab calculates summaries from locally stored data and is available offline.
Changing vehicle and preferences settings: these are saved locally and sync when connectivity returns.
What requires an internet connection
Google Sign-In: signing in or out requires an internet connection.
Sync to Firebase: data recorded offline is queued and syncs automatically the next time the app is in the foreground and connected.
Web app at /app: the web app requires an internet connection and shows only data that has already been synced from the phone.
Expense logging on a new session: if your Firebase authentication token has expired while offline, expense logging may be blocked until you reconnect and the token is refreshed.
What happens when connectivity returns
When the app comes to the foreground with an internet connection, it syncs all locally saved drives and expenses that have not yet been uploaded. This process is automatic — you do not need to do anything.
The web app does not update automatically. Refresh the browser page after the phone app has had time to sync.
Important notes
- All data is saved to your phone first. An internet outage does not cause data loss — records are stored locally and sync when connectivity returns.
- Receipt images are stored locally only and are never synced to the cloud, regardless of connectivity.
- If you record drives while not signed in, they are stored locally but are not associated with a Google account. They will not sync to the cloud even when you later sign in.
Common problems
I recorded drives while offline but they are not on the web app.
Open MileLedger on the phone, confirm you are connected to the internet and signed in with Google, and leave the app in the foreground for a minute. The drives will sync and then appear in the web app after a refresh.
I lost internet access mid-drive and the drive did not save correctly.
The drive is saved locally even without internet access. Check the Drives tab for the entry. It may have a 'Needs Review' or 'Interrupted Session' flag if the GPS trace was incomplete. Edit the distance if needed and save the corrected drive — it will sync when you are back online.
The Expenses tab is blank after going offline for a long time.
If your Google session expired while offline, MileLedger may not be displaying expense data. Connect to the internet, wait for the session to refresh automatically, or tap More → Account → Sign In if you see a sign-in prompt. Your expenses are stored locally and will reappear.
Related articles
- Changes are not appearing on another device or the web · Troubleshooting
- Sync is delayed — updates taking a long time · Troubleshooting
- A drive was not recorded · Troubleshooting
- Session expiration — signed out unexpectedly · Troubleshooting
Still stuck? Contact support or browse Troubleshooting.