Skip to Content
Platform.Ontology

iCloud backup and key value store

iCloud backs up the app container and offers a 1 MB key value store that survives uninstall.

Works without askingHome screen and system linksBackupAndroid and iPhoneAfter you uninstallWhen you are signed in

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

AndroidiPhone
StatusNot supportedSupported
First versionNot availableiOS 5.0
Permission or entitlementNot listediCloud entitlement for KVS and containers
Protection levelnoneentitlement
How access is grantednot-exposedentitlement
What the user seesNoneSettings > Apple ID > iCloud
How long it lastsn/aBackups restore app container; KVS persists across uninstall for the same Apple ID
How to take it backNot listedDisable iCloud for the app or delete from iCloud
Store policyNone listedApp Review 5.1.1
APINot listedNSUbiquitousKeyValueStore (1 MB total, 1024 keys), URLResourceKey.isExcludedFromBackupKey
NotesAndroid analog is Auto Backup and Block Store; see mob.os.auto-backupCaches 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

FieldTypeUnitRangePrecision
kvs_bytesintegerbinary1 MBsystem
kvs_keysintegercount1024system

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

TypeExampleApps
productivityA notes app syncs your theme and last note between iPhone and iPad.Bear
gamesA game stores your level on iCloud so a new phone picks up where you were.Monument Valley
fitnessA fitness app keeps your goals on all your devices.None named
mediaA reader app remembers where you stopped across devices.Kindle
analyticsA team sees a stable ID that stays after a reinstall.None named
adsAn ad SDK may store a device ID in the cloud to link installs.None named
shoppingA 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

Good uses and abuse

Legitimate uses

  • Cross device settings
  • Restore after reinstall

Known abuse

  • Cross install identity

Scores

ScoreValueMeaning
Sensitivity3 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction1 of 5How much the user has to do
Fingerprint bits5Rough identifying entropy, when known

History

  • 2011-10, iPhone iOS 5: iCloud and key value store introduced

Same idea on the web

Sources

How well checked: Based on official documentation.

On this page