Hello Everyone,
I'm building an application, which requires the user to log in. Once the user has logged in, they will not need to log in again if the close and re-open the application.
If the log in is successful I store the password in the keychain, using the code from
this blog.
This is where I am stuck. If the user has closed the application and then reopened it, the application will start up again. From this point I need to determine if their login credentials are valid, username and password, if so there is no need to display the login screen.
Using the Keychain code from above, the method to return the password requires the username and service name
Code:
+ (NSString *) getPasswordForUsername: (NSString *) username andServiceName: (NSString *) serviceName error: (NSError **) error
The service name is not an issue but the username is presenting me with a problem.
What is the best way to store the username in order to check if the keychain value exists?
Regards,
-Ben