Both CKMarkNotificationsReadOperation and CKFetchNotificationChangesOperation are deprecated in iOS 11 beta. What's the new way to handle notifications?

Originator:bill
Number:rdar://33787818 Date Originated:8/7/2017
Status:open Resolved:
Product:CloudKit Product Version:iOS 11
Classification:Suggestion Reproducible:
 
I am currently using CKFetchNotificationsOperation and CKMarkNotificationsReadOperation.h in my app to fetch changes from the public database. 

The headers claim these APIs are being deprecated
From iOS 11 headers.txt:
 
"CloudKit/CKMarkNotificationsReadOperation.h:14: API_DEPRECATED("Instead of iterating notifications, consider using CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation as appropriate", macos(10.10, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0))
 
CloudKit/CKFetchNotificationChangesOperation.h:13: API_DEPRECATED("Instead of iterating notifications to enumerate changed record zones, use CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation", macos(10.10, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0))"

CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation do not work with the public database. What is the correct way to handle public database changes?

Steps to Reproduce:
Go to https://developer.apple.com/documentation/cloudkit/notifications and see these have changed in the SDK to deprecated.

Expected Results:
These Operations will not be marked as deprecated until there is a suitable replacement.

Observed Results:
They are deprecated

Version:
iOS 8.0–11.0Deprecated
macOS 10.10–10.13Deprecated
tvOS 9.0–11.0Deprecated
watchOS 3.0–4.0Deprecated

Comments

This needs to be fixed ASAP

I'm having the same problem. There should be a workaround until a suitable replacement is implemented. I'm completely stuck on my workflow because of this.

By ivan.cantarino at Oct. 24, 2017, 1:54 p.m. (reply...)

Agreed

I am glad to see this, and will be adding my own to Apple. I am developing an app that uses the CloudKit public database, and makes extensive use of these APIs. I am at a loss as to what to do since these are deprecated.

Added mine as rdar://33887917.

By rcopelandemail at Aug. 15, 2017, 12:10 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!