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:
QSCloudKitSynchronizer
asking for the adapter. - zoneID:
CKRecordZoneID
that the model adapter will be used for.
#
ReturnsModelAdapter
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:
QSCloudKitSynchronizer
that found the deleted record zone. - zoneID:
CKRecordZoneID
of the record zone that was deleted.