Contents

TransientAppEntityDefinition

A definition you use to dynamically create transient app entities for testing.

Declaration

struct TransientAppEntityDefinition

Overview

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

let definitions = IntentDefinitions(
    bundleIdentifier: "com.apple.example"
)
let sessionEntity = definitions.transientEntities[
    "UserSessionEntity"
]
let entity = sessionEntity.makeEntity(
    sessionId: "temp-session-123",
    startTime: Date()
)

Topics

Creating a transient entity instance

Identifying the entity

Instance Methods

Default Implementations

See Also

Accessing app entities and queries