Keychain across uninstall
On iOS, small secrets stored in the Keychain stay on the device after the app is deleted and come back on reinstall.
In one line
Can keep small secrets on your iPhone that survive after you delete the app
On iOS, small secrets stored in the Keychain stay on the device after the app is deleted and come back on reinstall.
Developers use this to keep an anonymous id or login across reinstalls. It is a durable device level identifier unless the person wipes or restores to a new device.
What it can and can't do
What the user does: Nothing. It happens when you delete the app and install it again
It can
- Store tokens or IDs in the Keychain that stay after you delete the app
- Find them again after you reinstall on the same phone
- Treat you as a returning user after a reinstall
It cannot
- Keep them on Android, where deleting the app removes its keystore entries
- Count on it as an Apple promise; it is documented developer behavior, not guaranteed
- Be available while the phone is locked, if their protection class says so
How it differs between platforms: iPhone Keychain items usually survive uninstall. Android keystore entries are removed with the app.
On Android and iPhone
| Android | iPhone | |
|---|---|---|
| Status | Partial | Supported |
| First version | Android 6.0 (API 23) | iOS 2.0 |
| Permission or entitlement | None | None (kSecAttrAccessGroup for sharing) |
| Protection level | none | none |
| How access is granted | none | none |
| What the user sees | None | None |
| How long it lasts | Keystore keys are deleted at uninstall; Auto Backup can restore app data but not Keystore keys | Survives app deletion; migrates with encrypted backups and device to device transfer; kSecAttrSynchronizable syncs via iCloud Keychain |
| How to take it back | Clear data or uninstall | Erase device or call SecItemDelete |
| Store policy | None listed | None listed |
| API | Android Keystore, EncryptedSharedPreferences | SecItemAdd, SecItemCopyMatching |
| Notes | Keystore entries are removed with the app | Items persist across uninstall (documented developer behavior, no explicit Apple guarantee); data protection class controls availability |
Data you get
What comes back: Stored item
Shape: string
How often: Persistent
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
item | binary | None | small secrets | Not listed |
Technical limits
- Not guaranteed by Apple
- Lost on erase or new device unless in encrypted backup
The story
What it is
Small secrets stored in the iPhone keychain can stay after an app is deleted and return on reinstall.
For you
You delete an app and reinstall it, and you are still signed in. You never see why. It feels convenient, but it also means you cannot easily start fresh.
For makers
Makers keep an anonymous ID or login across reinstalls for fraud checks and returning user care. It is a durable device level ID until the phone is wiped.
Where you see it
| Type | Example | Apps |
|---|---|---|
| security | A bank app keeps a device ID across reinstalls to spot account takeovers. | None named |
| games | A free to play game gives the same trial bonus once, even after you delete and reinstall. | None named |
| ads | An attribution tool counts a returning device as the same person instead of a new install. | AppsFlyer |
| shopping | A store keeps you signed in after a reinstall. | None named |
| media | A streaming app limits free trials per device, even after you delete the app. | None named |
| analytics | A product team joins sessions before and after a reinstall. | None named |
| dating | A dating app blocks someone banned from rejoining with the same phone. | None named |
Risks
- Tracking across reinstalls
- Hard to reset
Android and iPhone in short
- Android: Android deletes keystore entries with the app.
- iPhone: Items stay after uninstall on the same device, and come back with a restored backup.
Good uses and abuse
Legitimate uses
- Keep login across reinstall
- Fraud checks
Known abuse
- Tracking across reinstalls
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 3 of 5 | How revealing the data is |
| Utility | 4 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 7 | Rough identifying entropy, when known |
History
- 2008-07, iPhone iOS 2: Keychain Services available to apps
Related capabilities
Related
- What uninstall deletes and what survives. Can't keep most data after uninstall, though backups, cloud and keychain may restore some
- Identifiers across reinstall (IDFV, App Set ID). Can recognise your phone after you reinstall, across one developer's apps
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.