I'm using the Keychain wrapper class provided by Apple. In my application I want to store and retrieve the username and password of the logged in user. When the app is launched again, it should check for the login credentials in the keychain and let the user into the app(automatic login). Tried some sample codes. nothing worked out. Please help me out with the procedure to do this.
Thanks.
Use PDKeyChainBindings
This is how to use:
PDKeychainBindings *bindings = [PDKeychainBindings sharedKeychainBindings];
[bindings setObject:@"myuser" forKey:@"username"];
[bindings setObject:@"kmypass" forKey:@"password"];
//How to retrieve
NSString *username = [bindings objectForKey:@"username"];
NSString *password = [bindings objectForKey:@"password"];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With