nicklockwood/FXKeychain

Clear keychain after reinstall

Closed this issue · 2 comments

Today I've got a problem that even after reinstalling the app I get FXKeychain already saved previous options. On the first load,
FXKeychain *keychain = [FXKeychain defaultKeychain];
i get
[keychain objectForKey:kUserGUID] not nil,
I get a previous value somehow. I'm not sure where the problem is. If someone still using this pod, any help would be appreciated.
But I see the last commit is about 2 years ago, probably should just stop using it, maybe some parts are just deprecated for current ios version.

That's the expected behavior. The iOS keychain persists even after an app is deleted. The only way to clear it is to reset the device.

A common technique if you want to reset the keychain after reinstall is to save a token in NSUserDefaults, then if you find a key in the keychain but no matching token in defaults, you know that app has been deleted and reinstalled.

Oh, my bad that I didn't admit that before. Thanks for fast response.