One Logo Pool Ball
CloudKit · IOS API REFERENCE

CKSyncEngine.Event.AccountChange

struct · iOS 17.0+ · SDK 27.1

struct AccountChange

The user signed in or out of their account. The sync engine automatically listens for account changes, and it sends this event when the user signs in or out. It's your responsibility to react appropriately to this change and update your local persistence. When the logged-in account changes, the sync engine resets its internal state. This means that it clears any pending database or record zone changes that you may have added. Note that it's possible the account changes multiple times while your app is quit. If this happens, you only receive one account change event representing the transition between the last known state and the current state. - Important: When a sync engine detects a change to the device's iCloud account, it resets its internal state, including unsaved changes to both records and record zones. Your app needs to handle this scenario gracefully.

Members (2)

get · iOS 17.0+

changeType

TypeScript
get changeType(): CKSyncEngine_Event_AccountChange_ChangeType
Swift declaration
let changeType: CKSyncEngine.Event.AccountChange.ChangeType

The iCloud account's change type.

get · iOS 17.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A textual description of the event that's suitable for logging.

Skipped declarations

No declarations were skipped in this snapshot.

All CloudKit types →