Posts

Post not yet marked as solved
0 Replies
293 Views
I'm testing fetching CKSubscriptions for new iOS 15 API. When there is no subscription on the server, an error is returned in perSubscriptionResultBlock, but I can't cast the error to a CKError. So this code won't work: guard let ckError = error as? CKError else { fatalError("not a CKError for perSubscriptionResultBlock") } Logging the error, however, shows the following info: <CKError 0x600001b3c720: "Unknown Item" (2003); server message = "subscription not found"; op = EA8F5331903D0EE5; uuid = 7A02CB0A-AA7E-4D13-AF90-7FDF3DED5CEC; container ID = "iCloud.com.####">. In a pre-iOS 15 era, it was the Partial Failure error with an Unknown Item error in the userInfo dictionary. For now I could just move on to creating a new subscription, but I fear it might not be a reliable solution in the future. Any ideas how else to handle this?
Posted Last updated
.