iCloudDocumentSync
iCloudDocumentSync copied to clipboard
Suggestion: Update documentation on use of retrieveCloudDocumentWithName
The documentation section covering retrieveCloudDocumentWithName should be updated with a warning that it is the completion block's responsibility to close the document once opened otherwise deleting it at a later point in time will result in the file auto-magically re-appearing.
I was ready for jumping off a bridge after more than a day wasted on trying to work out why I couldn't delete anything before I stuck the line below in the completion handler right after I'd accessed the file data.
[cloudDocument closeWithCompletionHandler:nil];
Thanks for sharing this important information!