Store user info at login for later use
ios, objective-c, xcode
Solution
If you are just storing the data returned from a successful login like you say, First Name, Last Name etc. I would use NSUserDefaults. If you intend to store any sensitive information such as username or password or anything else requiring additional confidentiality I would recommend using the keychain.
Problem
I am building an app where at login, the correct combination of username/password returns some basic user info (firstName, lastName, userType, companyID, etc). I will be needing those values and strings throughout my application to retrieve user-specific data. Could I store all those values and strings at login in an NSObject or NSData subclass so that I can later call it to retrieve the items I need? How can I do this? or is there a better alternative?