都知道类似密码相关的数据可以存放在 Keychain(钥匙串) 中,就算应用删除,相应存进去的 Keychain 数据也不会删除,下次再安装应用也能读取到这些数据。
比如有一串密码存在 Keychain,那么请问正确的删除 Keychain 中密码的时机是什么时候?或者根本不需要删除?
PHPz2017-04-17 17:50:45
In the iOS system, the keychain exists as a singleton. It can neither add a new keychain nor unlock it. These advanced features are only available in the OS X system!
Personally, I think that when using keychain, you generally only need to add, modify, and check functions. The data stored in the keychain is bound to the App. Even if the App is uninstalled, other Apps will not be able to obtain this data!
If you need to delete permissions, or the data will be cleared when the App is uninstalled, then it is recommended to use NSUserDefaults