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

# IntentValueQueryDefinition

A definition you use to create an intent value query for testing.

```
struct IntentValueQueryDefinition
```

## Overview

To create an intent value for testing and verify its results, first get its definition
using [`IntentDefinitions`](/documentation/AppIntentsTesting/IntentDefinitions) and its [`valueQueries`](/documentation/AppIntentsTesting/IntentDefinitions/valueQueries) property. Then,
perform the query and verify that it returns the expected results as shown in the following
example:

```swift
let definitions = IntentDefinitions(
    bundleIdentifier: "com.apple.example"
)
let searchQuery = definitions.valueQueries[
    "LandmarkIntentValueQuery"
]

let result = try await searchQuery.values(for: "Arizona")

// Code to verify the query's results.
// ...
```

## Topics

### Performing the intent value query

[`func values(for: some IntentValueConvertible) async throws -> ResolvedValueQueryResult`](/documentation/AppIntentsTesting/IntentValueQueryDefinition/values(for:))

Performs the value query with the given input and returns matching results.

### Identifying the query

[`let bundleIdentifier: String`](/documentation/AppIntentsTesting/IntentValueQueryDefinition/bundleIdentifier)

The bundle identifier of the app that includes the query.

[`let queryIdentifier: String`](/documentation/AppIntentsTesting/IntentValueQueryDefinition/queryIdentifier)

The query’s unique identifier.

## Relationships

### Conforms To

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

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