How to deal with files (A Document saved by MyApp)?

My application uses iCloud. My application stores all its data in one document and should never be more than this 1 document. However, sometimes my NSMetadataQuery returns 2 documents:

0: Documents / (Saved bt MyApp document) /MyDoc.ext
1: Documents /MyDoc.ext

This happens mainly when the user opens the application shortly after rebooting the iOS device.

When checking these two documents, this is document 0, which contains the most recent updates, so this is the one we want.

What is the reason for this “Saved Document” ends there and is the most recent, and how can I handle it correctly, so Documents / MyDoc.ext will be the one with the most recent content.

Thanks, -r

+5
source share
2 answers

I think Stuart's comment gives most of the answer you get. Only the fact that the document is called "(" Document saved "), and not" (Document saved), strongly offers him the right.
I think now it’s up to you to decide why saving a document crashes or never ends or never ends or something else. It can be a timeout if your application saves the document for too long when going to the background, crashing or something else - I don’t think you have provided enough information for someone to give you a really accurate answer.

+3
source

", AppName" Documents , (BLOB).

, , . , , , . , . , BLOB BLOB, .

, .

+1

All Articles