<!--
{
  "availability" : [
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabletopKit",
  "identifier" : "/documentation/TabletopKit/TabletopInteraction/Delegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "TabletopKit"
    ],
    "preciseIdentifier" : "s:11TabletopKit0A11InteractionC8DelegateP"
  },
  "title" : "TabletopInteraction.Delegate"
}
-->

# TabletopInteraction.Delegate

A protocol for objects that manage the entire flow of players interacting with equipment.

```
protocol Delegate
```

## Overview

Implement the [`update(interaction:)`](/documentation/TabletopKit/TabletopInteraction/Delegate/update(interaction:)) method to take an appropriate action depending on the equipment and the phase of the interaction. For example, turn a card face up if a player flips it over or toss a die when a gesture ends.

## Topics

### Taking actions

[`func update(interaction: TabletopInteraction)`](/documentation/TabletopKit/TabletopInteraction/Delegate/update(interaction:))

### Starting a toss

[`func onTossStart(interaction: TabletopInteraction, outcomes: [TabletopInteraction.TossOutcome])`](/documentation/TabletopKit/TabletopInteraction/Delegate/onTossStart(interaction:outcomes:))

Implement `onTossStart(interaction:outcomes)` to be notified that the toss has just started simulating and to receive the outcome of the simulation.
If the provided outcome is set to the equipment via actions, the equipment will retain the final state of the simulation even after the simulation ended.

### Accepting interactions

[`func shouldAcceptDirectInteraction(initialValue: TabletopInteraction.Value, handoffValue: TabletopInteraction.Value?) -> TabletopInteraction.NewDirectInteractionIntent`](/documentation/TabletopKit/TabletopInteraction/Delegate/shouldAcceptDirectInteraction(initialValue:handoffValue:))

Implement `shouldAcceptDirectInteraction(initialValue:handoffValue)` to provide the constants and initial configuration for
the new direct interaction, and to decide if the new interaction should be accepted or rejected. If the function is not implemented,
the default implementation will be used, which will call into the more generic `shouldAcceptInteraction(initialValue:handoffValue)`.

[`func shouldAcceptIndirectInteraction(initialValue: TabletopInteraction.Value, handoffValue: TabletopInteraction.Value?) -> TabletopInteraction.NewIndirectInteractionIntent`](/documentation/TabletopKit/TabletopInteraction/Delegate/shouldAcceptIndirectInteraction(initialValue:handoffValue:))

Implement `shouldAcceptIndirectInteraction(initialValue:handoffValue)` to provide the constants and initial configuration for
the new indirect interaction, and to decide if the new interaction should be accepted or rejected. If the function is not implemented,
the default implementation will be used, which will call into the more generic `shouldAcceptInteraction(initialValue:handoffValue)`.

[`func shouldAcceptInteraction(initialValue: TabletopInteraction.Value, handoffValue: TabletopInteraction.Value?) -> TabletopInteraction.NewInteractionIntent`](/documentation/TabletopKit/TabletopInteraction/Delegate/shouldAcceptInteraction(initialValue:handoffValue:))

Implement `shouldAcceptInteraction(initialValue:handoffValue)` to provide the initial configuration for new interactions,
and to decide if a new interaction should be accepted or rejected.
If this function is not implemented, the default implementation will be used which will reject all handoff interactions
and will accept all other interactions providing the default configuration.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)