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
source
share