Skip to content

PROTOCOL

IPSProximityEventsObserver

@objc public protocol IPSProximityEventsObserver

This class is used to provide indications about proximity events.

Methods

onEnterRegion(_:_:)

func onEnterRegion(_ trigger: IPSProximityTrigger, _ region: IPSRegion)

Invoked to inform that the user has entered the region of the provided proximity trigger.

  • Parameters:
  • trigger: The user is inside the region of this proximity trigger.
  • region: The user entered this region.

onExitRegion(_:_:)

func onExitRegion(_ trigger: IPSProximityTrigger, _ region: IPSRegion)

Invoked to inform that the user has left the region of the provided proximity trigger.

  • Parameters:
  • trigger: The user is inside the region of this proximity trigger.
  • region: The user entered this region.

onDwellInRegion(_:_:_:)

func onDwellInRegion(_ trigger: IPSProximityTrigger, _ region: IPSRegion, _ dwellTimeMilli: Int)

Invoked to inform that the user has spent time in the region of the provided proximity trigger.

  • Parameters:
  • trigger: The user is inside the region of this proximity trigger.
  • region: The user entered this region.
  • dwellTimeMilli: The amount of time spent in the region of the trigger (in milliseconds).

onServiceStateChanged(_:)

func onServiceStateChanged(_ newState: IPSProximity.ProximityServiceState)

Invoked to inform about new state of the Proximity Service.

  • Since: 2.11.0

  • Parameters:

  • newState: new state of the service.

Parameters

Name Description
newState new state of the service.

onError(_:)

func onError(_ error: IPSError)

Invoked to inform about errors in the triggers mechanism or trigger related operations.

  • Parameters:
  • error: The error description.