Using SSkeychain to store access_token & user login - AFNetworking

239 views Asked by At

I'm trying to store the users username, password and the access_token the user gets when logging in. I have searched a lot and found others with similar problems. But I'm still pretty new in xcode and objective-c, so I don't know how to use this SSKeychain library: Soffes/SSKeychain

1

There are 1 answers

3
Rajat On BEST ANSWER

To store the value in Keychain use the below code -

[SSKeychain setPassword:tfPAssword.text forService:@"UserPassword" account:@"com.myApp.app"];

To retrieve the value use below code

NSString *password = [SSKeychain passwordForService:@"UserPassword" account:@"com.myApp.app"];