Keeping important files in iCloud
I'm working on an iOS app and currently adding iCloud support. I'd like for the user to do some 'stuff,' save that 'stuff' in a file, and sync that file to the other devices over icloud. The tutorials I've seen to do this recommend using "setUbiquitous" on the files you want to sync to iCloud, which removes them from your app's sandbox directory (the 'documents' directory, in my case) and places them in an iCloud container directory where a daemon shuffles them off to iCloud and everything stays in sync.
But - now the user's 'stuff' file is exposed to be deleted off of icloud, which also deletes it off all of the iDevices. On the iDevice, anybody can go to settings/icloud/storage&backup/manage storage/theApp and delete the file. If they were to do that, it would be lost for good.
So I'm wondering - is this standard procedure - to just let people have the opportunity to, perhaps mistakenly, delete these possibly critical files out of iCloud?
So I'm not sure what the right thing is to do here... Do you just let people delete those files and be screwed? Do you always keep a copy of important files somewhere in the app sandbox? I'm curious to hear how other people are handling (or not handling) this situation.
Thanks!
|