An operation that marks push notifications as read by your app.


class CKMarkNotificationsReadOperation : CKOperation


If your app uses push notifications to track changes to records, you can use this operation object to note which push notifications do not need to be processed again.

If you assign a completion block to the completionBlock property of the operation object, the completion block is called after the operation executes and returns its results to you. You can use a completion block to perform housekeeping chores related to the operation, but do not use it to process the results of the operation itself. Any completion block you specify should be prepared to handle the failure of the operation to complete its task, whether due to an error or an explicit cancellation.


Initializing the Operation Object

init(notificationIDsToMarkRead: [CKNotification.ID])

Initializes and returns an operation object configured to mark the specified notifications as read.

Configuring the Operation Object

var notificationIDs: [CKNotification.ID]?

The array of notifications to mark as read.

Processing the Operation Results

var markNotificationsReadCompletionBlock: (([CKNotification.ID]?, Error?) -> Void)?

The block to execute when all results of the operation are known.


Inherits From

Conforms To

See Also

Notification Operations

class CKFetchNotificationChangesOperation

An operation that is used to retrieve unread notifications from a CloudKit container.