Initializer

init(recordIDs:)

Initializes and returns an operation object configured to fetch the records with the specified IDs.

Declaration

convenience init(recordIDs: [CKRecord.ID])

Parameters

recordIDs

An array of CKRecord.ID objects representing the records you want to retrieve. This parameter is used to initialize the value in the recordIDs property. If specify nil, you must assign an appropriate value to the recordIDs property before executing the operation.

If any of the objects in the array are not CKRecord.ID objects, this method raises an exception.

Return Value

An initialized operation object.

Discussion

The returned operation object is configured to retrieve all fields of the record, including any assets stored in those fields. If you want to minimize the amount of data returned initially, configure the desiredKeys property with the subset of keys whose values you want to retrieve.

After initializing the operation, you must associate at least one progress block with the operation object (excluding the completion block) to process the results.

See Also

Initializing the Operation Object