Class

CKOperationGroup

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

Declaration

class 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.

init(coder: NSCoder)

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

Creating a Configuration Group

var defaultConfiguration: CKOperation.Configuration!

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

var expectedReceiveSize: CKOperationGroup.TransferSize

Estimated size of traffic being downloaded from CloudKit.

var expectedSendSize: CKOperationGroup.TransferSize

Estimated size of traffic being uploaded to CloudKit.

var name: String?

The name of the operation group.

var operationGroupID: String

The unique identifier for the operation group.

var quantity: Int

number of elements associated with the operation group.

Relationships

Inherits From

See Also

Grouping Operation Execution

class CKOperation.Configuration

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software