Class

CKOperationGroup

An object that allows CloudKit operations to be grouped to align with user actions.

Declaration

@interface CKOperationGroup : NSObject

Overview

In certain situations, several CloudKit operations warrant being performed as if they were an atomic operation. For example, when building a Calendar app, you group the following actions:

  • Performing an initial fetch of data from the server, consisting of numerous queries that fetch changes and new objects

  • Performing an incremental fetch of data in response to a push notification

  • Saving several records due to a user saving a calendar event

You associate CKOperationGroup objects with CKOperation objects by setting the group property. Create a new CKOperationGroup object for each distinct user action.

Topics

Creating an Operation Group

- init

Initializes and returns an operation group object.

- initWithCoder:

Initializes and returns an operation group object from data in the coder provided.

Creating a Configuration Group

defaultConfiguration

The default configuration that is applied to operations contained in this group.

expectedReceiveSize

Estimated size of traffic being downloaded from CloudKit.

expectedSendSize

Estimated size of traffic being uploaded to CloudKit.

name

The name of the operation group.

operationGroupID

The unique identifier for the operation group.

quantity

number of elements associated with the operation group.

Relationships

Inherits From

Conforms To

See Also

Grouping Operation Execution

CKOperationConfiguration

A collection of properties that describes how a CloudKit operation should behave.