Skip to Content
Platform.Ontology

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.

Gets silentlyHome screen and system linksUninstall behaviorAndroid and iPhoneAfter you uninstallWhen you are signed in

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

AndroidiPhone
StatusPartialSupported
First versionAndroid 6.0 (API 23)iOS 2.0
Permission or entitlementNoneNone (kSecAttrAccessGroup for sharing)
Protection levelnonenone
How access is grantednonenone
What the user seesNoneNone
How long it lastsKeystore keys are deleted at uninstall; Auto Backup can restore app data but not Keystore keysSurvives app deletion; migrates with encrypted backups and device to device transfer; kSecAttrSynchronizable syncs via iCloud Keychain
How to take it backClear data or uninstallErase device or call SecItemDelete
Store policyNone listedNone listed
APIAndroid Keystore, EncryptedSharedPreferencesSecItemAdd, SecItemCopyMatching
NotesKeystore entries are removed with the appItems 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

FieldTypeUnitRangePrecision
itembinaryNonesmall secretsNot 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

TypeExampleApps
securityA bank app keeps a device ID across reinstalls to spot account takeovers.None named
gamesA free to play game gives the same trial bonus once, even after you delete and reinstall.None named
adsAn attribution tool counts a returning device as the same person instead of a new install.AppsFlyer
shoppingA store keeps you signed in after a reinstall.None named
mediaA streaming app limits free trials per device, even after you delete the app.None named
analyticsA product team joins sessions before and after a reinstall.None named
datingA 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

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

History

  • 2008-07, iPhone iOS 2: Keychain Services available to apps

Same idea on the web

Sources

How well checked: Based on official documentation.

On this page