fetch(withRecordZoneID:completionHandler:)
Fetches a specific record zone.
Declaration
func fetch(withRecordZoneID zoneID: CKRecordZone.ID, completionHandler: @escaping @Sendable (CKRecordZone?, (any Error)?) -> Void)func recordZone(for zoneID: CKRecordZone.ID) async throws -> CKRecordZoneParameters
- zoneID:
The identifier of the record zone to fetch.
- completionHandler:
The closure to execute with the fetch results.
Discussion
The completion handler takes the following parameters:
The fetched record zone, or
nilif there’s an error.An error if a problem occurs, or
nilif 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.