One Logo Pool Ball
AppIntents · IOS API REFERENCE

StringSearchCriteria

struct · iOS 17.2+ · SDK 27.1

struct StringSearchCriteria

A type that tells your app to match its items against a provided string. Use this type in app intents that match your app’s content against a string-based value. When you define an app intent using the ``AppSchema/SystemIntent/search`` schema or the ``ShowInAppSearchResultsIntent`` protocol, apply this type to the ``ShowInAppSearchResultsIntent/criteria`` property. When your app intent runs, the system sets that property to an instance of this structure and fills it with the search term. When you use this type in your app intent, use the accompanying ``StringSearchScope`` type for the ``ShowInAppSearchResultsIntent/searchScopes`` property.

Members (3)

init · iOS 17.2+

init

TypeScript
static init(term: string): StringSearchCriteria
Swift declaration
init(term: String)

Initializes the type with the specified search term. - Parameters: - term: The search term to use when matching items.

get · iOS 17.2+

term

TypeScript
get term(): string
Swift declaration
var term: String

The string to use when matching items in your app. Pass the value of this property to the code you use to search for items in your app. The system provides this value when it creates the app intent.

set · iOS 17.2+

term

TypeScript
set term(value: string)
Swift declaration
var term: String

The string to use when matching items in your app. Pass the value of this property to the code you use to search for items in your app. The system provides this value when it creates the app intent.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

StringSearchCriteria.defaultResolverSpecification

This protocol needs associated types that cannot yet cross the bridge.

All AppIntents types →