<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/FileManager/UbiquityIdentityDidChangeMessage",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:So13NSFileManagerC10FoundationE32UbiquityIdentityDidChangeMessageV"
  },
  "title" : "FileManager.UbiquityIdentityDidChangeMessage"
}
-->

# FileManager.UbiquityIdentityDidChangeMessage

A message a file manager sends after the iCloud (“ubiquity”) identity changes.

```
struct UbiquityIdentityDidChangeMessage
```

## Overview

The system generates this notification when the user logs in to or out of an iCloud account or enables or disables the syncing of documents and data.
This notification is your cue to update caches and any interface elements displaying iCloud–related content.
For example, hide all references to iCloud files when the user logs out of iCloud.

When your app receives this notification, get the new token from the [`ubiquityIdentityToken`](/documentation/Foundation/FileManager/ubiquityIdentityToken) instance property.
The value of that token is `nil` if the a person disabled iCloud or logged out.

Observe this message with the identifier [`ubiquityIdentityDidChange`](/documentation/Foundation/NotificationCenter/MessageIdentifier/ubiquityIdentityDidChange), or specify its type directly to the `addObserver(of:for:using:)` method.
The [`Subject`](/documentation/Foundation/NotificationCenter/MainActorMessage/Subject) of this message type is [`FileManager`](/documentation/Foundation/FileManager).

This message interoperates with the notification [`NSUbiquityIdentityDidChange`](/documentation/Foundation/NSNotification/Name-swift.struct/NSUbiquityIdentityDidChange).
The system notifies observers of the message when the [`NotificationCenter`](/documentation/Foundation/NotificationCenter) posts the notification.
Similarly, the system notifies observers of the notification when it posts the message.

## Topics

### Creating a message

[`init()`](/documentation/Foundation/FileManager/UbiquityIdentityDidChangeMessage/init())

Creates a message for a ubiquity identity change.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`MainActorMessage`](/documentation/Foundation/NotificationCenter/MainActorMessage)

[`Sendable`](/documentation/Swift/Sendable)

---

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)