Skip to content

CLASS

IPSLocationVisit

public final class IPSLocationVisit: NSObject

Describes a location-visit event to be monitored by IPSProximity.

An IPSLocationVisit binds a specific location on a specific floor of a specific building to a callback that is invoked once the user's positioning session detects that the location has been visited. When the visit completes, onLocationVisited is called with an IPSLocationVisitStatistics summary describing how the visit unfolded (duration, distance travelled, dwell time, and the enter/exit timestamps).

Create instances of this class and register them with the relevant IPSProximity methods to start receiving visit events at runtime.

  • Since: 9.9.0

Properties

groupId

public let groupId: String?

Optional group identifier for this event.

Events sharing the same groupId can be removed from IPSProximity together in a single call. Pass nil if grouping is not needed.

  • Since: 9.9.0

buildingId

public let buildingId: String

ID of the building in which this event should be monitored. Positioning in a different building will not affect this event.

  • Since: 9.9.0

floorOrder

public let floorOrder: Int

Floor order (within buildingId) on which this event should be monitored. Positioning on a different floor will not affect this event.

  • Since: 9.9.0

locationDefinition

public let locationDefinition: IPSLocalProximityEventLocationDefinition

Definition of the location whose visit should trigger this event.

  • Since: 9.9.0

onLocationVisited

public let onLocationVisited: (IPSLocationVisitStatistics) -> Void

Callback invoked when a visit to locationDefinition completes. The provided IPSLocationVisitStatistics describes the visit that just ended.

  • Since: 9.9.0

Methods

init(groupId:buildingId:floorOrder:locationDefinition:onLocationVisited:)

public init(
    groupId: String?,
    buildingId: String,
    floorOrder: Int,
    locationDefinition: IPSLocalProximityEventLocationDefinition,
    onLocationVisited: @escaping (IPSLocationVisitStatistics) -> Void
)

Creates a location-visit event with the provided parameters.

  • Parameters:
  • groupId: Optional identifier used to group related events so they can be removed from IPSProximity together. Pass nil if grouping is not needed.
  • buildingId: ID of the building in which this event should be monitored. Positioning in a different building will not affect this event.
  • floorOrder: Floor order (within buildingId) on which this event should be monitored. Positioning on a different floor will not affect this event.
  • locationDefinition: Definition of the location whose visit should trigger the event.
  • onLocationVisited: Callback invoked when a visit completes, receiving the IPSLocationVisitStatistics summary of that visit.

  • Since: 9.9.0

Parameters

Name Description
groupId Optional identifier used to group related events so they can be removed from IPSProximity together. Pass nil if grouping is not needed.
buildingId ID of the building in which this event should be monitored. Positioning in a different building will not affect this event.
floorOrder Floor order (within buildingId) on which this event should be monitored. Positioning on a different floor will not affect this event.
locationDefinition Definition of the location whose visit should trigger the event.
onLocationVisited Callback invoked when a visit completes, receiving the IPSLocationVisitStatistics summary of that visit.