An object that represents a push notification that was generated by a subscription object.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 3.0+
Subscription objects represent persistent queries on the server. When the server detects a change related to a subscription, it sends a push notification to the client that created the subscription and logs the push notification in the container. You use instances of this class to get information about the record involved in the push notification.
You do not create instances of this class directly. When your app receives a push notification, call the
init(from method of
CKNotification to generate a notification object of the appropriate type. You can fetch previously logged notifications from a container using a
CKFetch object. If the notification was triggered due to a subscription object, you receive an instance of this class with its
notification property set to
CKNotification. Use that object to retrieve the record-related information.
If a push notification’s payload is too large, pieces of data may be dropped until it is under the allowed size limit. The data used to alert the user is the most important and is dropped last. Data values in this class are among the first to be dropped, with values being dropped in the following order: