<!--
{
  "availability" : [
    "iOS: 27.3.0 -",
    "iPadOS: 27.3.0 -",
    "macCatalyst: 27.3.0 -",
    "macOS: 27.3.0 -",
    "tvOS: 27.3.0 -",
    "visionOS: 27.3.0 -",
    "watchOS: 27.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntentsTesting",
  "identifier" : "/documentation/AppIntentsTesting/AppEntityIdentifierExpectation",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "App Intents Testing"
    ],
    "preciseIdentifier" : "s:17AppIntentsTesting0A27EntityIdentifierExpectationV"
  },
  "title" : "AppEntityIdentifierExpectation"
}
-->

# AppEntityIdentifierExpectation

An expectation that checks whether an app entity is a specific instance by
comparing its type and identifier.

```
struct AppEntityIdentifierExpectation
```

## Overview

An identifier expectation checks which entity instance a value holds. You
can pass it as an intent parameter expectation, as an intent result
expectation, or wherever a property holds an entity.

You don’t create an identifier expectation directly. Call
[`expectIdentifier(_:)`](/documentation/AppIntentsTesting/AppEntityDefinition/expectIdentifier(_:)) instead:

```swift
let workCalendarExpectation = createEventIntentDefinition.expect(
    calendar: calendarEntityDefinition.expectIdentifier(
        "edea53fb-90b7-4481-afc7-d86e2dd0d27d"
    )
)
```

To also check the instance’s properties, call `expect` on it, which returns
an [`AppEntityExpectation`](/documentation/AppIntentsTesting/AppEntityExpectation).

## Topics

### Instance Properties

[`var expect: IntentValueExpectationCallable<any IntentValueExpectation, AppEntityExpectation>`](/documentation/AppIntentsTesting/AppEntityIdentifierExpectation/expect)

A callable that creates an entity expectation for the current instance
from value expectations for its properties.

## Relationships

### Conforms To

[`IntentValueExpectation`](/documentation/AppIntentsTesting/IntentValueExpectation)

[`ResolvableAppEntityExpectation`](/documentation/AppIntentsTesting/ResolvableAppEntityExpectation)

[`ResolvableIntentValueExpectation`](/documentation/AppIntentsTesting/ResolvableIntentValueExpectation)

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

[`AppEntityExpectationProviding`](/documentation/AppIntentsTesting/AppEntityExpectationProviding)

[`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)