iOS: How to store username/password within an app?

I have a login-screen in my iOS app.
The username and password will be saved in the NSUserDefaults and be loaded into the login-screen again when you enter the app again (of course, NSUserDefaults are permanent).

Now, the user have the possibility to disable the username/password saving feature.

So the NSUserDefaults will be cleared then.

But In my app I need this username/password for database queries for the user.
So: Where to store the data except NSUserDefaults?
(This place can / should be deleted when the user quit the app or logout).

15 Answers
15

Leave a Comment