Contents

AppEntityDefinition

A definition you use to dynamically create entity instances for testing.

Declaration

struct AppEntityDefinition

Mentioned in

Overview

To create an app entity instance for testing, load the definition for your app entity, using IntentDefinitions and its entities property, then create an entity instance as shown in the following example:

let definitions = IntentDefinitions(
    bundleIdentifier: "com.apple.example"
)
let landmarkEntity = definitions.entities[
    "LandmarkEntity"
]
let entity = landmarkEntity.makeReference(
    identifier: "yosemite-falls"
)

Topics

Creating an app entity instance

Retrieving all entities

Searching matching entities

Accessing suggested entities

Accessing onscreen entities

Identifying the entity

Instance Methods

Default Implementations

See Also

Accessing app entities and queries