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
ICloudStorevia theICloudStore.addObserver(_:)method - the
ICloudStorewas added to aDataStack - the
ICloudStoreand theDataStackare 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
storagethe
ICloudStoreinstance being observeddataStackthe
DataStackthat 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
storagethe
ICloudStoreinstance being observeddataStackthe
DataStackthat 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
storagethe
ICloudStoreinstance being observeddataStackthe
DataStackthat 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
storagethe
ICloudStoreinstance being observeddataStackthe
DataStackthat 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
storagethe
ICloudStoreinstance being observeddataStackthe
DataStackthat 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
storagethe
ICloudStoreinstance being observeddataStackthe
DataStackthat 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
storagethe
ICloudStoreinstance being observeddataStackthe
DataStackthat 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
storagethe
ICloudStoreinstance being observeddataStackthe
DataStackthat manages the peristent store
View on GitHub
ICloudStoreObserver Protocol Reference