Access iCloud Documents always shows Error in iOS 13 beta 2

Access iCloud Documents always shows Error in iOS 13 beta 2


Error Domain=NSCocoaErrorDomain Code=512 "“***” couldn’t be copied to “Documents”." UserInfo={NSSourceFilePathErrorKey=/path/to/***, NSUserStringVariant=( Copy ), NSDestinationFilePath=/path/to/***, NSFilePath=/path/to/***, NSUnderlyingError=0x280717f90 {Error Domain=NSPOSIXErrorDomain Code=11 "Resource deadlock avoided"}}


Error Domain=NSCocoaErrorDomain Code=256 "Could't open “***”。" UserInfo={NSURL=path/to/***, NSFilePath=/path/to/***, NSUnderlyingError=0x28379ec40 {Error Domain=NSPOSIXErrorDomain Code=11 "Resource deadlock avoided"}}


iCloud Documents works fine in macOS, but not work in iOS devices. Shows the same error when acccessing ubiquity items in iCloud Doucments folder.

Replies

This seems to be a certain trust or initial issue.
When a new iCloud container id appears, the device need some steps to trust the new container. I must use a previous trused app to link the new container to the new device (trusted means the app can access the iCloud Documents).


For example, "ShapeEdit“ has an icloud container "com.example.ShapeEdit", it could access its container without problem.

A new app called "MyApp" wants to use new iCloud container id "com.mycompany.MyApp", but it always fails recently.

Change "ShapeEdit“ to use the new icloud container "com.mycompany.MyApp" will let "MyApp" access it, and the device trust new the iCloud container.


If you update the bundle id of "ShapeEdit“, and use a new icloud container "com.example.ShapeEdit2", the new ShapeEdit will also fail on the same device.

So this is not the developer's code problem. It should be some iCloud Container initial step issue on iOS devices.

I have the same problem with iOS13 beta. First, the file list can not be acquired for the synchronized iCloud documents folders and files. On the other hand, file download seems to be taking place. The downloaded file has a Dead Lock error and can not be read out.
List the cases where the same code was tested in multiple environments.
1) iOS12.3.1 & XCode 10 built app (released app on App Store)> OK
2) iOS12.3.1 & XCode11 beta built app> OK
3) iOS13 beta & XCode 10 built app (released app on App Store)> OK

4) iOS13 beta & XCode11 beta built app > Dead Lock Error