Class

CKModifyBadgeOperation

A modify badge operation object updates the badge value applied to the app’s icon.

Declaration

class CKModifyBadgeOperation : CKOperation

Overview

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.

This operation object can update the badge for the current device or for all of the user’s devices.

Topics

Initializing the Operation Object

init(badgeValue: Int)

Initializes and returns an operation object for setting the badge of the app.

Configuring the Operation Object

var badgeValue: Int

The numerical value to apply to the app’s badge.

Processing the Operation Results

var modifyBadgeCompletionBlock: ((Error?) -> Void)?

The block to execute with the results of the operation.

Relationships

Inherits From

Conforms To