NSFileCoordinator locks up

In my App I'm using the NSFileCoordinator to read and write files to the iCloud, so they sync between devices. This works fine in general. But under iOS 11 I've noticed on my iPad (but not on my iPhone), that some times the iCloud syncing stops competely. If this happens this issue won't go away until the device is rebooted. Then evertyhing works again for some time. Some time later (days, weeks) the problem is back, iCloud sync fails completely.


"So I used the debugger to find out what's going on. And I noticed, when the problem occurs, all attepmts to use the NSFiIeCoordinator will lock up. For example whan calling the method "coordinateReadingItemAtURL:options:error:byAccessor:" the block which is called when it is safe to do the read operation is never called. The same happens for coordinated write operations. Every call to the coordinated file operations will block forever. Even if there's only one single call, so there can not be a dead-lock within the App.


Is this a known issue (the fact that this issue vanished after a reboot and does not occur on my iPhone indicates that is might be (one of the many) bugs of iOS 11)?Is there anythign special I can do to avoid this problem?

Replies

Seeing this too 😟

Some more information about this issue:


The whole issue is not only related to the iCloud. It looks like a system-wide problem. When this bug shows up, then also other App are affected, like the "Files" App not showing any files anymore (access to these files must be also coordinated via NSFileCoordinator), even the UIDocumentInteractionController ("Open in" feature) does no longer open. So I guess at system level the file coordination must be stuck in some kind of dead-lock, so everything which uses coordinated file access will hang.

Have yous find solution to this problem, I also run into this situation on iOS 12.2.