I thought I understood that files stored in the Documents directory would never be purged by iOS, in addition to being backed up to iCloud unless marked with the NSURLIsExcludedFromBackupKey. But after re-reading the documentation, I'm confused:
Use the "do not back up" attribute for specifying files that should remain on device, even in low storage situations. Use this attribute with data that can be recreated but needs to persist even in low storage situations for proper functioning of your app or because customers expect it to be available during offline use. This attribute works on marked files regardless of what directory they are in, including the Documents directory. These files will not be purged and will not be included in the user's iCloud or iTunes backup.
This seems to suggest that iOS WILL purge files from the Documents directory, unless they are marked with the flag, in which case it will also not back them up to iCloud.
I want my files to be BOTH backed up to iCloud AND never purged by iOS. What should I do to get this behavior?
This is a very important issue for me, because I'm spending a lot of time fighting with customers who insist that my app is losing their files even though I can never reproduce the problems in my testing.
Thanks,
Frank
Use the "do not back up" attribute for specifying files that should remain on device, even in low storage situations. Use this attribute with data that can be recreated but needs to persist even in low storage situations for proper functioning of your app or because customers expect it to be available during offline use. This attribute works on marked files regardless of what directory they are in, including the Documents directory. These files will not be purged and will not be included in the user's iCloud or iTunes backup.
This seems to suggest that iOS WILL purge files from the Documents directory, unless they are marked with the flag, in which case it will also not back them up to iCloud.
I want my files to be BOTH backed up to iCloud AND never purged by iOS. What should I do to get this behavior?
This is a very important issue for me, because I'm spending a lot of time fighting with customers who insist that my app is losing their files even though I can never reproduce the problems in my testing.
Thanks,
Frank