I would like to save a file programmatically and fetch it. Is it possible to create a file and save it locally and retain it even the app is deleted?
Asked
Active
Viewed 1,234 times
2
-
You cant, if the data is small enough Keychain is ur best bet to retain the data across installations – Sandeep Bhandari Dec 20 '17 at 07:13
-
@SandeepBhandari If I just gonna store a String, what is the limit of the keychain? – RussVirtuoso Dec 20 '17 at 07:18
-
Hope this helps https://stackoverflow.com/questions/13488793/is-there-any-length-limit-of-string-stored-in-keychain – Sandeep Bhandari Dec 20 '17 at 07:20
2 Answers
4
No you can't do this, Because all files is depend on app container and when you uninstall app container automatically removed.
But for that you can use iCloud or Dropbox for file storage and after you can retrieve same file,

Jaydeep Vora
- 6,085
- 1
- 22
- 40
1
You can use iCloud to sync user's data (such as a database). So when application is deleted and downloaded again, saved data in iCloud will be sync with app bundle on downloading process.

Hai Dang Nguyen
- 26
- 5