iCloudDocumentSync
iCloudDocumentSync copied to clipboard
iCloudDocument and autosave
One of the nice things about UIDocument is that it auto-saves automatically at appropriate times (see https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDocument_Class/#//apple_ref/occ/instm/UIDocument/autosaveWithCompletionHandler:).
iCloudDocumentSync uses its own UIDocument subclass, iCloudDocument, which seems to negate this advantage. iCloudDocument just stores the document data and it's up to the app to update that data at appropriate times. Constantly updating the NSData may work for trivial data, but will not scale to more complex data which may take time to generate.
That is a good point, indeed. Although I'm not sure how easily the project could be changed to implement this -- sounds like a lot of refactoring would need to be done. Any ideas?
It think allowing the user to have their own UIDocument subclass would cover both the autosave and file package issues. I don't think UIDocument subclass methods need to know anything about iCloud (this is the case in my app).