简体   繁体   中英

iCloud : how to manage iCloud deactivation?

I'm facing a problem concerning the iCloud synchronization process.

When a user decide to activate iCloud, the document stored locally in the app sandbox is moved to the local iCloud directory and then the file in the sandbox is deleted. This is done by the setUbiquitous method.

My problem arise if the user deactivates iCloud in the iPhone settings ( by switching off "iCloud documents and data save" ). In this case the iCloud directory is no more accessible and the app sandbox is void ( because it was deleted by the setUbiquitous method ). Therefore, the user lost all it's data...

One solution could be to always maintain a copy of the iCloud file in the app sandbox... but that seems quite a lot of work. There should be an easier way to do... Anyone has a better idea/solution ??

Thanks for reading ;)

The files are not actually deleted and will be re-downloaded when iCloud is enabled again. Couldn't you just show a message with that information? In a way, that's similar to removing an email account in the settings app. The user probably expects that his/her emails are then deleted from the device, but are still available "in the cloud".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM