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?
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.
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