0

Hello I am working on an app that need to keep user data. Like username/password. I understand I could do this with plist files (simplest way) but what if the user deletes the app and then redownloads it? The data would be reset I presume. So I was thinking about querying a web server for the data. Is there any other more mainstream way that iOS games keep user data please list them if possible.

Tobias
  • 236
  • 2
  • 6

2 Answers2

2

You should never store password in plist files, they are just plain text. This would making hacking the users account very easy.

But to answer your question, yes there is such a place it is the Keychain. It is meant to store data that needs to secure.

rckoenes
  • 69,092
  • 8
  • 134
  • 166
1

You should use KeyChain to save info that should not be deleted together with app. https://developer.apple.com/library/ios/documentation/Security/Reference/keychainservices/Reference/reference.html

This SO thread could be useful for you How to use Keychain for saving password like GenericKeychain sample code

Community
  • 1
  • 1
Avt
  • 16,927
  • 4
  • 52
  • 72