<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKSyncEngineAccountChangeEvent",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CKSyncEngineAccountChangeEvent"
  },
  "title" : "CKSyncEngineAccountChangeEvent"
}
-->

# CKSyncEngineAccountChangeEvent

The user signed in or out of their account.

```
@interface CKSyncEngineAccountChangeEvent : CKSyncEngineEvent
```

## Overview

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.

## Topics

### Understanding the change

[`changeType`](/documentation/CloudKit/CKSyncEngineAccountChangeEvent/changeType)

The iCloud account’s change type.

[`CKSyncEngineAccountChangeType`](/documentation/CloudKit/CKSyncEngineAccountChangeType)

Describes a change to the device’s iCloud account.

[`previousUser`](/documentation/CloudKit/CKSyncEngineAccountChangeEvent/previousUser)

The previous iCloud account’s record identifier.

[`currentUser`](/documentation/CloudKit/CKSyncEngineAccountChangeEvent/currentUser)

The current iCloud account’s record identifier.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)