Host

struct Host

Each command names the host process and the control state the wearer saw.

  • A fresh identifier for this host process that invalidates commands from an earlier session.

    Declaration

    Swift

    let session: String
  • The current command revision, incremented on control changes and accepted requests.

    Declaration

    Swift

    private(set) var revision: Int { get }
  • The latest snapshot used to validate a remote command.

    Declaration

    Swift

    private var snapshot: Snapshot?
  • Records a sample and advances the revision when the available controls or their target change.

    Declaration

    Swift

    mutating func update(_ state: Snapshot)
  • Consume the revision before UIKit handles the action, even when navigation finishes asynchronously.

    Declaration

    Swift

    mutating func consumeCommand(_ request: [String : Any], at now: Date) -> TimerOperation?