我已在我的应用中的Keychain
中保存了登录凭据。我需要知道,我可以看到或访问Keychain
,就像在Mac中存储凭据一样。
我遵循了tutorial
/*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]];