我想在KeyChain中存储一个字符串。我正在尝试使用SSKeychain.h,SSKeychain.m,SSKeychainquery.h和SSKeychainquery.h
由于这些文件中存在许多方法。因此感到困惑,并想知道使用哪种方法以及如何使用。要存储的字符串是我的应用程序的密码。
最佳答案
您可以尝试以下变体:
// Store credentials in Keychain
[SSKeychain setPassword:@"thePassword"
forService:@"com.yourCompany.yourApp"
account:@"theUserName"];
// Retrieve credentials from Keychain
NSString *password = [SSKeychain passwordForService:@"com.yourCompany.yourApp"
account:@"theUserName"];
关于ios - 如何将字符串从uitextfield存储到KeyChain,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38053262/