Will items in iOS keychain survive app uninstall and reinstall?

后端 未结 3 2116
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 09:33

I am looking for documentation about the iOS keychain items. My specific question is if keychain items will survive an app uninstall and reinstall cycle. It seems to work th

相关标签:
3条回答
  • 2020-11-28 10:21

    yes they will.

    see a correspondinng question of mine:

    How to find out WHEN a user bought the app / installed it for the first time (possible without UDID?)


    AS I SEE IT:

    'Officially' it is implied by the fact that the keychain is for multiple apps.. and that it 'belongs' to the os:

    Apple Documentation

    A keychain is an encrypted container that holds passwords for multiple applications and secure services.

    => ergo the keychain survives the app

    PLUS

    a keychain item can be shared between multiple apps

    0 讨论(0)
  • 2020-11-28 10:29

    Perhaps this is what you are looking for.
    Apple Documentation

    Note: On iPhone, Keychain rights depend on the provisioning profile used to sign your application. Be sure to consistently use the same provisioning profile across different versions of your application.

    0 讨论(0)
  • 2020-11-28 10:35

    I dug around on the Apple developer forums, and a Apple developer (eskimo1, aka Quinn) states at 2012-08-27 that this is the current behaviour but it's a far as he knows not /documented/ behaviour, so this might change in the future. He also says that deleting shared keychain items is always going to be tricky, which is one of the reasons this it hasn't been addressed yet.

    So I guess that this leaves the question open: there is no definitive answer. It is not documented and can change at any point in time. Relying on it MAY cause problems in the future.

    UPDATE 2017-04-04:

    In iOS 10.3 beta, keychain info for an app is removed when the app is uninstalled, but this behaviour seems to have been removed in the final 10.3 version. At Apple Documentation It is suggested that this is about to change and we should NOT rely on keychain access data being intact after an app uninstallation. See also iOS 10.3 beta 3 doesn't persist data of KeychainItem.

    0 讨论(0)
提交回复
热议问题