iCloud backup and key value store
iCloud backs up the app container and offers a 1 MB key value store that survives uninstall.
In one line
Can save the app's folder to iCloud and keep 1 MB of values after uninstall
iCloud backs up the app container and offers a 1 MB key value store that survives uninstall.
Documents and Application Support are in iCloud backup unless excluded; NSUbiquitousKeyValueStore keeps up to 1 MB and 1024 keys that sync across the person's devices.
What it can and can't do
What the user does: Nothing. It happens when iCloud Backup is on and the phone is charging
It can
- Back up documents and settings in the app's container
- Keep up to 1 MB and 1024 small values, even after you delete the app
- Restore the app's data on a new iPhone
It cannot
- Back up caches and temporary files, which are left out
- Keep more than 1 MB of small values
- Do this on Android, which has Auto Backup and Block Store instead
How it differs between platforms: iPhone has iCloud Backup. Android uses Auto Backup and Block Store.
On Android and iPhone
| Android | iPhone | |
|---|---|---|
| Status | Not supported | Supported |
| First version | Not available | iOS 5.0 |
| Permission or entitlement | Not listed | iCloud entitlement for KVS and containers |
| Protection level | none | entitlement |
| How access is granted | not-exposed | entitlement |
| What the user sees | None | Settings > Apple ID > iCloud |
| How long it lasts | n/a | Backups restore app container; KVS persists across uninstall for the same Apple ID |
| How to take it back | Not listed | Disable iCloud for the app or delete from iCloud |
| Store policy | None listed | App Review 5.1.1 |
| API | Not listed | NSUbiquitousKeyValueStore (1 MB total, 1024 keys), URLResourceKey.isExcludedFromBackupKey |
| Notes | Android analog is Auto Backup and Block Store; see mob.os.auto-backup | Caches and tmp excluded; Documents and Application Support included unless flagged; KVS limit 1 MB and 1024 keys (docs, from memory) |
Data you get
What comes back: iCloud data
Shape: binary
How often: Sync or nightly backup
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
kvs_bytes | integer | binary | 1 MB | system |
kvs_keys | integer | count | 1024 | system |
Technical limits
- Tied to the Apple ID
- Excluded files do not restore
The story
What it is
Apple's iCloud saves an app's files and a tiny note pad of settings that follow you between devices.
For you
You set up a new iPhone and your apps remember your settings. The same note pad also syncs between your iPhone and iPad.
For makers
Makers get free sync of small settings and easy restores. It can also keep an old identifier alive across reinstalls and devices.
Where you see it
| Type | Example | Apps |
|---|---|---|
| productivity | A notes app syncs your theme and last note between iPhone and iPad. | Bear |
| games | A game stores your level on iCloud so a new phone picks up where you were. | Monument Valley |
| fitness | A fitness app keeps your goals on all your devices. | None named |
| media | A reader app remembers where you stopped across devices. | Kindle |
| analytics | A team sees a stable ID that stays after a reinstall. | None named |
| ads | An ad SDK may store a device ID in the cloud to link installs. | None named |
| shopping | A shopping app keeps your cart sync across devices. | None named |
Risks
- Cross install identity
- Old data returns
Android and iPhone in short
- Android: Android uses Auto Backup and Block Store instead.
- iPhone: Documents and Application Support are backed up unless the app excludes them. The note pad holds up to 1 MB.
What the platform says
- Apple: iCloud key value storage. Apple lets apps store a small set of settings that sync across a person's devices through iCloud.
Good uses and abuse
Legitimate uses
- Cross device settings
- Restore after reinstall
Known abuse
- Cross install identity
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 3 of 5 | How revealing the data is |
| Utility | 3 of 5 | How useful it is to honest apps |
| Friction | 1 of 5 | How much the user has to do |
| Fingerprint bits | 5 | Rough identifying entropy, when known |
History
- 2011-10, iPhone iOS 5: iCloud and key value store introduced
Related capabilities
Related
- Android Auto Backup and restore. Can save up to 25 MB of app data to your Google account daily
- Keychain across uninstall. Can keep small secrets on your iPhone that survive after you delete the app
- What uninstall deletes and what survives. Can't keep most data after uninstall, though backups, cloud and keychain may restore some
Same idea on the web
- Persistent storage (persist). Can ask the browser not to delete its saved data when disk space is low
Sources
How well checked: Based on official documentation.