---
title: "fetch(withRecordZoneID:completionHandler:)"
framework: cloudkit
role: symbol
role_heading: Instance Method
path: "cloudkit/ckdatabase/fetch(withrecordzoneid:completionhandler:)"
---

# fetch(withRecordZoneID:completionHandler:)

Fetches a specific record zone.

## Declaration

```swift
func fetch(withRecordZoneID zoneID: CKRecordZone.ID, completionHandler: @escaping @Sendable (CKRecordZone?, (any Error)?) -> Void)
```

```swift
func fetch(withRecordZoneID zoneID: CKRecordZone.ID) async throws -> CKRecordZone
```

## Parameters

- `zoneID`: The identifier of the record zone to fetch.
- `completionHandler`: The closure to execute with the fetch results.

## Discussion

Discussion The completion handler takes the following parameters: The fetched record zone, or nil if there’s an error. An error if a problem occurs, or nil if CloudKit successfully fetches the specified record zone. For information on a more convenient way to fetch specific record zones, see recordZones(for:) in Swift or CKFetchRecordZonesOperation in Objective-C.

## See Also

### Fetching Record Zones

- [recordZones(for:)](cloudkit/ckdatabase/recordzones(for:).md)
- [fetch(withRecordZoneIDs:completionHandler:)](cloudkit/ckdatabase/fetch(withrecordzoneids:completionhandler:).md)
- [fetchAllRecordZones(completionHandler:)](cloudkit/ckdatabase/fetchallrecordzones(completionhandler:).md)
