My app uses NSPersistentCloudKitContainer to implement Coredata and iCloud synchronization data Recently, I received feedback from online users about data synchronization errors, and the error code is CKErrorDomain 12 . In the App, I use NSPersistentCloudKitContainer.eventChangedNotification to monitor the synchronization status, the following is the specific code NotificationCenter.default.publisher(for: NSPersistentCloudKitContainer.eventChangedNotification) .sink(receiveValue: { notification in if let cloudEvent = notification.userInfo?[NSPersistentCloudKitContainer.eventNotificationUserInfoKey] as? NSPersistentCloudKitContainer.Event { let event = SyncEvent(from: cloudEvent) } }) .store(in: &disposables) When the user feedbacks that the data cannot be synchronized, it can be seen from the above code that an error occurred when CoreData + iCloud was exporting data. At the same time, cloudKitEvent.error does not contain any error information, only CKErrorDomain 12 this information, I don’t know
0
0
1.2k