AppEntityDefinition
A definition you use to dynamically create entity instances for testing.
Declaration
struct AppEntityDefinitionMentioned 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
entities(identifiers:)entityQuery(identifiers:)entities(matching:)entityQuery(matching:)spotlightQuery(_:)