Skip to content

[personal-wp] Storing data on iOS #3409

@fellyph

Description

@fellyph

My WordPress currently uses a Service Worker and the File System API to store user data locally.
On iOS/WebKit, Apple implements a strict Intelligent Tracking Prevention (ITP) policy. If a web app is accessed via Safari and remains inactive for 7 days, all script-writable storage is automatically cleared, resulting in complete data loss for the user.

Running the app as an installed PWA on iOS bypasses the strict 7-day browser limitation, allowing a significantly longer period to store data safely on the device. However, users are often unaware of this. If they simply use the app in Safari or leave the PWA inactive for an extended period, they remain at high risk of losing their data.

Proposed Solution
We need a multi-tiered approach to secure user data on iOS:

1. iOS User Notification & PWA Prompt

  • Implement OS detection to identify users accessing the app via iOS/iPadOS Safari.
  • Display a warning explaining the iOS background data wipe limitation.
  • Encourage users to "Add to Home Screen" (install as a PWA).

2. Remote Backups & Recovery

  • Because even PWA storage is not guaranteed permanently on iOS, we need to create a feature allowing users to perform periodic remote backups of their File System API data.
  • Target platforms: GitHub (via Gists or Repo commits), with potential future support for Google Drive, Dropbox, etc.
  • Implement a seamless "Restore" flow so users can easily recover their data online from their chosen remote storage if an OS-level wipe occurs.

Metadata

Metadata

Labels

No fields configured for Enhancement.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions