AdapterProvider
An AdapterProvider gets requested for new model adapters when a CloudKitSynchronizer encounters a new CKRecordZone that does not already correspond to an existing model adapter.
@objc public protocol AdapterProvider Requirements#
cloudKitSynchronizer(_:​modelAdapterForRecordZoneID:​)#
The CloudKitSynchronizer requests a new model adapter for the given record zone.
func cloudKitSynchronizer(_ synchronizer: CloudKitSynchronizer, modelAdapterForRecordZoneID zoneID: CKRecordZone.ID) -> ModelAdapter?Parameters#
- synchronizer: QSCloudKitSynchronizerasking for the adapter.
- zoneID: CKRecordZoneIDthat the model adapter will be used for.
Returns#
ModelAdapter correctly configured to sync changes in the given record zone.
cloudKitSynchronizer(_:​zoneWasDeletedWithZoneID:​)#
The CloudKitSynchronizer informs the provider that a record zone was deleted so it can clean up any associated data.
func cloudKitSynchronizer(_ synchronizer: CloudKitSynchronizer, zoneWasDeletedWithZoneID zoneID: CKRecordZone.ID)Parameters#
- synchronizer: QSCloudKitSynchronizerthat found the deleted record zone.
- zoneID: CKRecordZoneIDof the record zone that was deleted.