CKQuerySubscription is not 100% out of date. But his area is changed
For the Public Database and Private Database zone, CKQuerySubscription is used by default to receive notification.
There is a 2-step process for the public database and the private zone of the user zone.
Step 1: CKDatabaseSubscription for a private and public database.
The first step will give you the addition of a zone, updating a zone, or zone removal notifications for a private and public database.
Step 2. Retrieve all user zones from the shared database and private database. And create a CKRecordZoneSubscription for each zone.
Note. CKQuerySubscription does not work for a shared database, but it will work in a private area of ββthe user database, where you can add predicate and notification parameters.
Because we created the CKDatabaseSubscription in step 1. If there are any additions, changes, or deletions of a zone when we select user zones from a private and public database. You will receive a notification.
If the notification type is .database, then all zones from the public or private database are retrieved based on the subscription identifier.
If the notification type is .recordZone, then get the zone ID and retrieve the record using the previously saved server replacement token.
source share