Contents

init(_:_:)

Creates a turn from an utterance and what Siri should do in response to it.

Declaration

init(_ utterance: String, @SiriTurnExpectationBuilder _ content: () -> SiriTurnExpectationBuilder.Component)

Discussion

The trailing block holds the turn’s expectations — any of Calls, Finds, OnScreen, SiriResponse and Loads, each graded only against this turn’s observations:

UserTurn("Create a Launch Party event tomorrow at 7 PM") {
    Calls { CreateEventIntent }
    Finds { EventEntity.expect(title: .equals("Launch Party")) }
}

See Also

Creating a user turn with expectations