Back in July I wrote about recovering corrupted iWork documents from iCloud. Well, since then I've learnt two things:
- The contents of a corrupted document package can be copied from the Finder by navigating to the
~/Library/Mobile Documents/com~apple~Pages/Documents/folder, right-clicking the corrupted document and selecting 'Show Package Contents' (i.e. this doesn't need to be done from the terminal, although deleting the corrupted document does); and
- How to address ongoing corruption issues.
Number one is self-explanatory, but in the case of number two, since my last post, every new document I created would become corrupted—although not immediately, which made the problem very hard to diagnose. Even more bizarrely, pre-existing documents that weren't corrupted continued to work without issue. However, after doing some searching online it appeared the cause was likely that the iCloud data store on one of my computers had been corrupted and was corrupting new documents when it synced. And the solution was to disable 'Documents & Data' syncing in the iCloud preferences, which deletes the local iCloud data store, and then re-enable it to recreate the data store (which also re-downloads the documents from iCloud, so nothing is actually lost through this process).
With my computers spread across different locations, and the apparent inconsistency of when documents would become corrupted, I wasn't sure which computer was the culprit, so ended up undertaking this process on each of them. However, at the end I was still encountering the corruption issue. So as a last ditch effort I disabled and re-enabled the setting on my iPad, which appears was the device causing the problem.
Since taking this action my iCloud syncing of iWork documents has been working without issue. So if you're having this same issue, this may be the solution for you as well.