iOS 10.3 beta 3 doesn't persist data of KeychainItem

喜欢而已 提交于 2019-11-27 06:06:53

问题


I have observed behavior of app in iOS 10.2.1 device and iOS 10.3 beta 3 device for https://developer.apple.com/library/content/samplecode/GenericKeychain/Introduction/Intro.html

Keychain data is being deleted in iOS 10.3 beta 3. That was still found in earlier versions.

Do we have any alternative to do this?


回答1:


Now that 10.3 has been officially released, it's been confirmed by several parties, including in this Apple's developers forum post, that this issue is not present in the final release.

Keychain data is not being deleted upon app's uninstall.




回答2:


Originally (Since iOS 10.3 beta 1 to 5?) the keychain WAS NOT persisted.

Apple staff:

This is an intentional change in iOS 10.3 to protect user privacy. Information that can identify a user should not be left on the device after the app that created it has been removed.


But since iOS 10.3 beta 6, the keychain IS persisted again.

Nobody gives you any reassurances it will work that way in the future.

While it is fine to use it the way we do, I strongly encourage you to write your app so that it acts reasonably if this behaviour change.




回答3:


As of iOS 10.3 beta 2 keychain information will be deleted when an app is deleted. Keychain information used to persist between app uninstall and reinstalls but that was not intended behavior and was a side effect of implementation that people got used to.

You'll probably just have to get used to the new behavior unless they have a top secret keychain replacement in the pipeline. keychain data should still persist since 10.3 beta 2 across app uninstall / reinstall by using an app group that shares said keychain info and having another application in the app group installed; so it doesn't delete the keychain info. Also I would guess it doesn't delete items synchronized with iCloud from iCloud but just deletes the local copy. Just a guess though.

Here is a link to an apple developer forum on the issue:

https://forums.developer.apple.com/message/210531#210531



来源:https://stackoverflow.com/questions/42431562/ios-10-3-beta-3-doesnt-persist-data-of-keychainitem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!