0
votes

I'm writing my first app for iOS. In it conceived some protection from repetitive actions of the same user device (few, if apple account. Login "login-password" at the application level as such does not exist, therefore it was necessary to implement a hidden identification. Convenient would it be to generate a random number that would be stored somewhere in the user, and remained unchanged even when reinstalling the app.

Started to read it. Learned about SSKeyChain. But just do not have enough experience to understand your logic... Please explain in accessible language!

My assumptions: (please correct if I'm wrong!)

1) each user single Apple account that is attached all apps to one of the device, and thus the storage on the device. Or is the cloud for one account and multiple devices for this account (which is called keychain)?

2) has a free Access to the library SSKeyChain (via the security framework), which I for your application can write any data with their keys (the password to the app, login, color scheme)... so if you reinstall the app, it could check "are there any settings in KeyChain for me?" and take data from there. Similar to NSUserDefaults/SharedPreferences (ios/android), not receding after reinstalling the app.

3) the Possibility of losing data from KeyChain the user device is only shift Apple account any action by Apple.

So? :)

1

1 Answers

1
votes
  1. If you reinstall app,information stored in keychain is still there.But your provisioning profile should not change From document

On iPhone, Keychain rights depend on the provisioning profile used to sign your application. Be sure to consistently use the same provisioning profile across different versions of your application.

  1. Keychain is encrypted container and in iOS an application can access only its own keychain items.
  2. When a user backs up iPhone data, the keychain data is backed up but the secrets in the keychain remain encrypted in the backup. The keychain password is not included in the backup. Therefore, passwords and other secrets stored in the keychain on the iPhone cannot be used by someone who gains access to an iPhone backup.

It is just an iOS provide container to save sensitive data。I do not understand what you say about Apple account.