<!--
{
  "availability" : [
    "iOS: 27.3.0 -",
    "iPadOS: 27.3.0 -",
    "macOS: 27.3.0 -",
    "visionOS: 27.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SiriEvaluations",
  "identifier" : "/documentation/SiriEvaluations/IntentExpectationBuilder",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Siri Evaluations"
    ],
    "preciseIdentifier" : "s:15SiriEvaluations24IntentExpectationBuilderO"
  },
  "title" : "IntentExpectationBuilder"
}
-->

# IntentExpectationBuilder

A result builder that collects the intents in a calls expectation.

```
@resultBuilder enum IntentExpectationBuilder
```

## Overview

A bare `AppIntentDefinition` (match-any) and an `AppIntentExpectation`
(`CreateEventIntent.expect(title:)`) are both `AppIntentExpectationProviding`, so one overload lowers either
straight to an `any AppIntentExpectationProviding` — no separate definition/expectation paths.

## Topics

### Building results

[`static func buildArray([[any AppIntentExpectationProviding]]) -> [any AppIntentExpectationProviding]`](/documentation/SiriEvaluations/IntentExpectationBuilder/buildArray(_:))

Creates a component by combining the components from each iteration of a loop.

[`static func buildBlock([any AppIntentExpectationProviding]...) -> [any AppIntentExpectationProviding]`](/documentation/SiriEvaluations/IntentExpectationBuilder/buildBlock(_:))

Creates a component by combining the components of a block.

[`static func buildEither(first: [any AppIntentExpectationProviding]) -> [any AppIntentExpectationProviding]`](/documentation/SiriEvaluations/IntentExpectationBuilder/buildEither(first:))

Creates a component from the first branch of a conditional statement.

[`static func buildEither(second: [any AppIntentExpectationProviding]) -> [any AppIntentExpectationProviding]`](/documentation/SiriEvaluations/IntentExpectationBuilder/buildEither(second:))

Creates a component from the second branch of a conditional statement.

[`static func buildExpression(some AppIntentExpectationProviding) -> [any AppIntentExpectationProviding]`](/documentation/SiriEvaluations/IntentExpectationBuilder/buildExpression(_:))

Creates a component from an app intent.

[`static func buildOptional([any AppIntentExpectationProviding]?) -> [any AppIntentExpectationProviding]`](/documentation/SiriEvaluations/IntentExpectationBuilder/buildOptional(_:))

Creates a component from a conditional statement with no alternative branch.



---

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)