我已将登录凭据保存Keychain
在我的应用程序中。我需要知道,我是否可以Keychain
像在 Mac 中看到或访问凭据存储在 .
我跟着这个教程
/*write in keychain*/
KeychainItemWrapper *keychain=[[KeychainItemWrapper alloc]initWithIdentifier:@"Login Credentials" accessGroup:nil];
[keychain setObject:self.txtusername.text forKey:(__bridge id)kSecAttrAccount];
[keychain setObject:self.txtpassword.text forKey:(__bridge id)kSecValueData];
/*read from keychain*/
NSString *stuname=[keychain objectForKey:(__bridge id)kSecAttrAccount];
stuname=[stuname stringByAppendingString:@" "];
stuname=[stuname stringByAppendingString:[keychain objectForKey:(__bridge id)kSecValueData]];