<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/EntityIdentifier/==(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Operator",
  "symbol" : {
    "kind" : "Operator",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents16EntityIdentifierV2eeoiySbAC_ACtFZ"
  },
  "title" : "==(_:_:)"
}
-->

# ==(_:_:)

Compares two entity identifiers for equality.

```
static func == (lhs: EntityIdentifier, rhs: EntityIdentifier) -> Bool
```

## Discussion> Important: This implementation **intentionally ignores** the `stableIdentifier` field.
> Only `entityType` and `identifier` are compared.
> 
> This ensures that the same entity on different devices (same local ID, different stable ID)
> is considered equal, enabling correct Dictionary/Set behavior.

---

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)