Adam Johns Adam Johns - 1 year ago 68
iOS Question

Best way to store user information for my iOS app

What kind of database do you suggest? I want to store user email, username, password, and a couple other random pieces of information. It doesn't have to be fancy. Just a simple database. Are there any free options?

Answer Source

The user information needs to be stored in the keychain to keep it secure.

Any other information could be stored in any one of:

  1. User defaults NSUserDefaults
  2. File on disk (maybe a plist)
  3. Database Core Data (technically just a file on disk)

Which you choose depends on what the data is, how much there is and what kind of access you need to it.

If your data is small and chosen by the user as some kind of setting then user defaults makes sense and is the lowest cost for you to implement.

To use a database, check out Core Data intro.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download