nenosinc / iCloudDocumentSync

Integrate iCloud into iOS document projects with one-line code methods. Sync, upload, manage, and remove documents from iCloud quickly and easily. Helps to make iCloud "just work" for developers too.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suggestion: Update documentation on use of retrieveCloudDocumentWithName

Seoras opened this issue · comments

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!