I've stored my credentials in the KeyChain in the Login.m class
[SFHFKeyChainUtils storeUsername:self.usernameField.text andPassword:self.passwordField.text forServiceName:@"myApp" updateExisting:TRUE error:&error];
Now when i delete from memory my app from my iPhone and start it again, if the user has logged in before, i want the login screen to be skipped and next screen to be shown. Now my question is, how to do that in AppDelegate.m class. I want to access the current user's credentials and if they are filled with data, login screen to be skipped.
[SFHFKeyChainUtils getPasswordForUsername:??? andServiceName:@"myApp" error:&error];
I know that this is the way if getting the password for a given username, but the problem is that i dont have the access to the username in the AppDelegate class.
Can someone help me? Thank you :)
I've found a solution using NSUserDefaults, storing username and password for later use, but on several posts i've read that using SFHFKeyChainUtils is more secure than NSUserDefaults.