<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKFetchRecordsOperation/init(recordIDs:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CKFetchRecordsOperation(im)initWithRecordIDs:"
  },
  "title" : "init(recordIDs:)"
}
-->

# init(recordIDs:)

Creates a fetch operation for retrieving the records with the specified IDs.

```
convenience init(recordIDs: [CKRecord.ID])
```

## Parameters

`recordIDs`

An array of [`CKRecord.ID`](/documentation/CloudKit/CKRecord/ID) objects that represents the records you want to retrieve. If you provide an empty array, you must set the [`recordIDs`](/documentation/CloudKit/CKFetchRecordsOperation/recordIDs) property before you execute the operation.

## Discussion

A fetch operation retrieves all of a record’s fields, including any assets that those fields reference. If you want to minimize the amount of data that the operation returns, configure the [`desiredKeys`](/documentation/CloudKit/CKFetchRecordsOperation/desiredKeys-34l1l) property with only the keys that contain the values that you have an interest in.

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)