1

If the ubiquity container (iCloud folder) is not available for whatever reason, I add any new documents to the users 'Documents' directory, however, should it become available again I add the documents to the ubiquity container.

My question is, what is the best method to saving documents seen as a ubiquity container is so unreliable?

For example, if a user switches off documents in the cloud, those documents are deleted. Is there a notification to listen out for when this happens so I can transfer them to the local directory?

And vice versa, if a user switches the documents in the cloud on, is there a notification to move documents from local to ubiquitous store?

Thanks

Adam Carter
  • 4,741
  • 5
  • 42
  • 103

1 Answers1

0

No automatic notification, the files in the ubiquity container either disappear or reappear. Your app logic has to take account of what files need moved into and out of iCloud when they're visible to you, but once they're gone, they're gone!

IMHO, having data disappear is one of the most user-confusing things about iCloud. The user expects it to sync stuff, but it's an all or nothing game at the moment. The only way around this if you really want more 'sync like' behaviour is to have both a local non-ubiquity copy, AND a copy in the local ubiquity container so it gets uploaded to the iCloud servers. That then means you've effectively got two copies of everything on every device. Messy.

Much easier to stick to the Apple mandated method, and assume the user knows what they're doing if they log out of iCloud, or delete your data from iCloud.

Rob Glassey
  • 2,237
  • 20
  • 21