Instance Method


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


- (instancetype)initWithRecordIDs:(NSArray<CKRecordID *> *)recordIDs;



An array of CKRecordID 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 CKRecordID objects, this method raises an exception.

Return Value

An initialized operation object.


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