Added func documentation
This commit is contained in:
parent
4c499c2e98
commit
5de778f82c
|
@ -87,6 +87,7 @@ extension CloudKitZone {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Creates the zone record
|
||||||
func createZoneRecord(completion: @escaping (Result<Void, Error>) -> Void) {
|
func createZoneRecord(completion: @escaping (Result<Void, Error>) -> Void) {
|
||||||
guard let database = database else {
|
guard let database = database else {
|
||||||
completion(.failure(CloudKitZoneError.unknown))
|
completion(.failure(CloudKitZoneError.unknown))
|
||||||
|
@ -106,6 +107,7 @@ extension CloudKitZone {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Subscribes to zone changes
|
||||||
func subscribeToZoneChanges() {
|
func subscribeToZoneChanges() {
|
||||||
let subscription = CKRecordZoneSubscription(zoneID: Self.zoneID)
|
let subscription = CKRecordZoneSubscription(zoneID: Self.zoneID)
|
||||||
|
|
||||||
|
@ -371,6 +373,7 @@ extension CloudKitZone {
|
||||||
modify(recordsToSave: [], recordIDsToDelete: [recordID], completion: completion)
|
modify(recordsToSave: [], recordIDsToDelete: [recordID], completion: completion)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Delete CKRecords
|
||||||
func delete(recordIDs: [CKRecord.ID], completion: @escaping (Result<Void, Error>) -> Void) {
|
func delete(recordIDs: [CKRecord.ID], completion: @escaping (Result<Void, Error>) -> Void) {
|
||||||
modify(recordsToSave: [], recordIDsToDelete: recordIDs, completion: completion)
|
modify(recordsToSave: [], recordIDsToDelete: recordIDs, completion: completion)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue