简体   繁体   English

将NSUserDefault存储在钥匙串中

[英]Store NSUserDefault in keychain

In my app I need to store an username and a password. 在我的应用程序中,我需要存储用户名和密码。 I know this data is sensitive. 我知道这些数据很敏感。 So I would like to store it in the keychain. 所以我想将其存储在钥匙串中。 The problem is that the credentials are set up in the iOS settings (NSUserDefault). 问题在于凭据是在iOS设置(NSUserDefault)中设置的。 Is there any way to store this sensitive data in the keychain using the iOS settings?? 有什么方法可以使用iOS设置在钥匙串中存储此敏感数据吗?

Thanks in advance!! 提前致谢!!

如果您能够读取NSUserDefaults中的值,则可以轻松保存到钥匙串: https : //developer.apple.com/library/ios/documentation/Security/Reference/keychainservices/Reference/reference.html

I think there is only one solution. 我认为只有一种解决方案。 I'm going to create my own settings view. 我将创建自己的设置视图。 Thanks to all! 谢谢大家!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM