How to figure out sync errors in Production?

I'm using SwiftData with CloudKit private database. I was able to identify the error on my device by debugging in Xcode with com.apple.CoreData.SQLDebug flag. However, in Production, I couldn't find a way to get the cause of errors.

I tried inspecting the error coming from eventChangedNotification. The NSPersistentCloudKitContainer.Event error does not contain any underlying error (neither CKError.userInfo nor in NSError.underlyingError). It only reports a partial failure with CKErrorDomain code 2.

If a user encounter an error, there seems to be no way to retrieve the error details.

Is there any way to access the error details or logs in Production?

Answered by DTS Engineer in 873977022

Your best bet will be the sysdiagnose. How to do so is detailed in Capture and analyze a sysdiagnose.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Accepted Answer

Your best bet will be the sysdiagnose. How to do so is detailed in Capture and analyze a sysdiagnose.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

How to figure out sync errors in Production?
 
 
Q