<!--
{
  "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/CKFetchRecordZonesOperation",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CKFetchRecordZonesOperation"
  },
  "title" : "CKFetchRecordZonesOperation"
}
-->

# CKFetchRecordZonesOperation

An operation for retrieving record zones from a database.

```
class CKFetchRecordZonesOperation
```

## Overview

Use this operation object to fetch record zones so that you can ascertain their capabilities.

If you assign a handler to the <doc://com.apple.documentation/documentation/Foundation/Operation/completionBlock> property of the operation, CloudKit calls it after the operation executes and returns its results. You can use the handler to perform any housekeeping tasks that relate to the operation, but don’t use it to process the results of the operation. The handler you specify should manage any failures, whether due to an error or an explicit cancellation.

## Topics

### Initializing the Zone Fetch Operation

[`init(recordZoneIDs:)`](/documentation/CloudKit/CKFetchRecordZonesOperation/init(recordZoneIDs:))

Creates an operation for fetching the specified record zones.

[`init()`](/documentation/CloudKit/CKFetchRecordZonesOperation/init())

Creates an empty fetch zones operation.

### Getting All Record Zones

[`fetchAllRecordZonesOperation()`](/documentation/CloudKit/CKFetchRecordZonesOperation/fetchAllRecordZonesOperation())

Returns an operation for fetching all record zones in the current database.

### Configuring a Zone Fetch Operation

[`recordZoneIDs`](/documentation/CloudKit/CKFetchRecordZonesOperation/recordZoneIDs)

The IDs of the record zones to retrieve.

### Processing Zone Fetch Results

[`fetchRecordZonesCompletionBlock`](/documentation/CloudKit/CKFetchRecordZonesOperation/fetchRecordZonesCompletionBlock)

The closure to execute after CloudKit retrieves all of the record zones.



---

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)