I am testing the same thing with a user that has a maxed out iCloud storage.
The eventChangedNotification received only mentions a partialFailure without any CKPartialErrorsByItemIDKey so there doesn't seem to be a way to come to the conclusion that the issue is with the storage quota being exceeded just by listening those notifications, is there? Is the only way trying to manually write to cloudkit and analysing the error received? If so, why is there a .quotaExceeded code for the notifications?
*** debugDescription print of the notification:
NSPersistentCloudKitContainer.eventChangedNotification received: name = NSPersistentCloudKitContainerEventChangedNotification, object = Optional(), userInfo = Optional([AnyHashable("event"): <NSPersistentCloudKitContainerEvent: 0x300d186e0> { type: Export store: C947EFBD-BE17-49EF-807B-087A62EBF0DE started: 2024-06-13 01:39:23 +0000 ended: 2024-06-13 01:39:28 +0000 succeeded: NO error: CKErrorDomain:2 }])
*** debug output from console:
error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _recoverFromPartialError:forStore:inMonitor:] 2812: <NSCloudKitMirroringDelegate: 0x301114870>: Error recovery failed because the following fatal errors were found: {
"<CKRecordID: 0x302e99dc0; recordName=61920C45-377E-4E1F-BD51-8E4E0D290B59, zoneID=com.apple.coredata.cloudkit.share.3DA846A5-15EC-409D-9160-E1764FFA74BC:defaultOwner>" = "<CKError 0x302090f90: "Quota Exceeded" (25/2035); server message = "Quota exceeded"; op = ADC86A29FF3777F8; uuid = 7C016545-FF26-4B11-B475-A15B770DDC25; Retry after 344.0 seconds; container ID = "xxxx">";
[...]