Persist Data After App Deletion

Is there any reliable way to persist some app data after the user deletes the app, so that the next time they download it again the data will still be accessible?

For a variety of reasons, I do not currently want to require users to create accounts and then store that data on an external server - I am just storing all app data in UserDefaults. If a user deletes the app, though, it is important that if a user redownloads it certain datapoints would be accessible from the last time they used it.

I have done a bit of research and it looks like Keychain can persist data after app deletion, but it seems like that might not be optimal (as it's meant more for things like passwords).

Are there any other solutions I should try, or is it inevitable that I will need to require users to create accounts and then store this information in a backend I manage?

Replies

I have done a bit of research and it looks like Keychain can persist data after app deletion

Yeah, don’t rely on that. This is a long and complex topic. See this post for the backstory.

For a variety of reasons, I do not currently want to require users to create accounts

I can undertand the desire to not run your own accounts. One alternative is to rely on their Apple ID, using services like iCloud Keychain, iCloud key-value store [1], and CloudKit.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] That is, the NSUbiquitousKeyValueStore class.