ICloudStoreObserver
@available(*, deprecated, message: "Please see the release notes and Core Data documentation.")
public protocol ICloudStoreObserver : AnyObject
Implement the ICloudStoreObserver
protocol to observe ubiquitous storage notifications from the specified iCloud store.
Note that ICloudStoreObserver
methods are only called when all the following conditions are true:
- the observer is registered to the
ICloudStore
via theICloudStore.addObserver(_:)
method - the
ICloudStore
was added to aDataStack
- the
ICloudStore
and theDataStack
are still persisted in memory
-
iCloudStoreWillFinishUbiquitousStoreInitialImport(storage:dataStack:)
Default implementationNotifies that the initial ubiquitous store import will complete
Default Implementation
Declaration
Swift
func iCloudStoreWillFinishUbiquitousStoreInitialImport(storage: ICloudStore, dataStack: DataStack)
Parameters
storage
the
ICloudStore
instance being observeddataStack
the
DataStack
that manages the peristent store -
iCloudStoreDidFinishUbiquitousStoreInitialImport(storage:dataStack:)
Default implementationNotifies that the initial ubiquitous store import completed
Default Implementation
Declaration
Swift
func iCloudStoreDidFinishUbiquitousStoreInitialImport(storage: ICloudStore, dataStack: DataStack)
Parameters
storage
the
ICloudStore
instance being observeddataStack
the
DataStack
that manages the peristent store -
iCloudStoreWillAddAccount(storage:dataStack:)
Default implementationNotifies that an iCloud account will be added to the coordinator
Default Implementation
Declaration
Swift
func iCloudStoreWillAddAccount(storage: ICloudStore, dataStack: DataStack)
Parameters
storage
the
ICloudStore
instance being observeddataStack
the
DataStack
that manages the peristent store -
iCloudStoreDidAddAccount(storage:dataStack:)
Default implementationNotifies that an iCloud account was added to the coordinator
Default Implementation
Declaration
Swift
func iCloudStoreDidAddAccount(storage: ICloudStore, dataStack: DataStack)
Parameters
storage
the
ICloudStore
instance being observeddataStack
the
DataStack
that manages the peristent store -
iCloudStoreWillRemoveAccount(storage:dataStack:)
Default implementationNotifies that an iCloud account will be removed from the coordinator
Default Implementation
Declaration
Swift
func iCloudStoreWillRemoveAccount(storage: ICloudStore, dataStack: DataStack)
Parameters
storage
the
ICloudStore
instance being observeddataStack
the
DataStack
that manages the peristent store -
iCloudStoreDidRemoveAccount(storage:dataStack:)
Default implementationNotifies that an iCloud account was removed from the coordinator
Default Implementation
Declaration
Swift
func iCloudStoreDidRemoveAccount(storage: ICloudStore, dataStack: DataStack)
Parameters
storage
the
ICloudStore
instance being observeddataStack
the
DataStack
that manages the peristent store -
iCloudStoreWillRemoveContent(storage:dataStack:)
Default implementationNotifies that iCloud contents will be deleted
Default Implementation
Declaration
Swift
func iCloudStoreWillRemoveContent(storage: ICloudStore, dataStack: DataStack)
Parameters
storage
the
ICloudStore
instance being observeddataStack
the
DataStack
that manages the peristent store -
iCloudStoreDidRemoveContent(storage:dataStack:)
Default implementationNotifies that iCloud contents were deleted
Default Implementation
Declaration
Swift
func iCloudStoreDidRemoveContent(storage: ICloudStore, dataStack: DataStack)
Parameters
storage
the
ICloudStore
instance being observeddataStack
the
DataStack
that manages the peristent store