2

On iOS, if a PFUser object remains anonymous, and the user restores the app from an iCloud backup while activating a new device, will the local PFUser data remain intact?

A common scenario would be if a user loses their old device, or sells their old device. When activating a new device, they restore their apps and data from an iCloud backup and expect their app to be in the same state that they had before.

Since iCloud backups save NSUserDefaults and files in the Documents directory, etc., but not anything stored in Keychain Services, where is the local PFUser data being cached? And would the anonymous PFUser object also be restored?

Also, since the old device is no longer available, the user would not be able to convert the anonymous PFUser to a regular user by signing up with username/password, Facebook, Twitter, etc.

Even if the anonymous PFUser data is restored, can the user continue to use it on the new device? For example, is the sessionToken still valid on a different device?

The Parse SDK is not open source and the documentation at http://parse.com/docs/ios/api and https://www.parse.com/docs/ios_guide#users/iOS doesn't go into these implementation details.

Ryan Kreager
  • 3,571
  • 1
  • 20
  • 35
cyanware
  • 163
  • 7
  • Figure this out yet? – Jacob Nov 29 '14 at 22:16
  • I don't have a good solution to my original problem regarding an anonymous PFUser. Our current approach is to replace the anonymous user's username/password that was generated by Parse with our own auto-generated username/password, and save those values in iCloud's NSUbiquitousKeyValueStore. – cyanware Dec 01 '14 at 16:58
  • Additional comment regarding the PFUser's sessionToken property: apparently, if you have a user's sessionToken, you can become that user without needing their username/password. There's some discussion I've found that suggests that this feature is a major security flaw, especially on Android: [security concerns about session token in parse platform](https://groups.google.com/forum/#!topic/parse-developers/qjvKJYikHQ8) – cyanware Dec 01 '14 at 17:07

0 Answers0