Disruptive Documentation

Structure Object​Present​Event

public struct ObjectPresentEvent: Codable, Equatable  

An event that is sent whenever an object is close to a proximity sensor or not.

See the Developer Website for more details.

%255 ObjectPresentEvent ObjectPresentEvent Equatable Equatable ObjectPresentEvent->Equatable Codable Codable ObjectPresentEvent->Codable PublishableEvent PublishableEvent ObjectPresentEvent->PublishableEvent

Nested Types

ObjectPresentEvent.State

The proximity state of a sensor.

Conforms To

PublishableEvent

Used by event types (such as TouchEvent) to indicate that they can be published to the device emulator.

Codable
Equatable

Initializers

init(state:​timestamp:​)

public init(state: State, timestamp: Date)  

Creates a new ObjectPresentEvent.

init(from:​)

public init(from decoder: Decoder) throws  

Properties

state

public let state: State

Whether or not an object is close to the proximity sensor.

timestamp

public let timestamp: Date

The timestamp of when the object present event was received by a Cloud Connector.

event​Type

public var eventType: EventType  

Methods

encode(to:​)

public func encode(to encoder: Encoder) throws