iOS 10.3 Beta 2 autodeletes keychain items after application uninstall?

In previous versions of iOS, the keychain data persisted even when the app was uninstalled and reinstalled on the device. After upgrading to iOS 10.3 beta 2, it appears as if deleting the app also deletes all associated keychain contents for that app. The code I'm using to interface with the keychain hasn't changed, and works with iOS 10.2. Is anyone else experiencing this behavior? I haven't had a chance to test this with 10.3 beta 1.


I've searched through related threads here:

https://forums.developer.apple.com/message/75464

https://forums.developer.apple.com/message/112523


The conclusion from the Apple staff member is that the persistence of the keychain data across apps re-installs is a side-effect of the implementation rather than a feature, and that the behavior should not be relied upon. Maybe they finally decided to update the implementation?

Hello huin,


I also confirmed that this issue does not reproduce with iOS 10.3 beta 7.


>I hope this change will not include in public release.

I feel the same.

Like others, we found that keychain persitence after app removal is still ocurring on iOS 10.3 beta 7. As Apple typically provides more frequent beta updates approaching the GM and that appears to be occuring now does this mean that keychain persistence will still be possible on the final GM?


We're already working on an alternate solution to provide the features our users will need, but it will be good to be informed of Apple's plans since these changes are quite costly, and even if the change will be imminent but simply postponed then we could schedule our work accordingly. You also mentioned that some documentation was in the works, and I hope you might update this thread with that once it's available.


Thank you gc.!

kSecAttrAccessGroupToken – A workaround for the keychain autodelete behaviour found in iOS 10.3

10.3 was released publicly today and it seems the behaviour experienced in the betas is not reflected in the public version. In my testing, keychain items continue to persist beyond app delete.

Thanks for testing

Rozzle


Thans for your information.

Rozzle


Thanks for testing.

I also confirmed the same result.

Hi Zevik,


This is a bug in the beta that should already be fixed by the time you read this.


kSecAttrAccessGroupToken is writable only by CryptoTokenKit smart card drivers. Apps can query the keychain using that attribute in order to find items stored on a particular smart card. This attribute is not for any other use.


--gc

iOS 10.3 Beta 2 autodeletes keychain items after application uninstall?
 
 
Q