CLASS
IPSProximity
public class IPSProximity: NSObject
This class represents the Indoor Positioning System (IPS) Proximity Triggers Client.
It is the element by which all communication with the Proximity Triggers server is performed,
and all services are delivered. This object informs the application in real time
about the state of the Proximity IPSProximityTrigger objects on the map on which the positioning is currently performed
and any interaction the user is making with them.
Methods
getServiceState()
@objc public static func getServiceState() -> ProximityServiceState
Current state of the Proximity Service - Since: 2.11.0
describeServiceState(_:)
@objc public static func describeServiceState(_ state: ProximityServiceState) -> String
String representation of the Proximity Service State - Since: 2.11.0
addTriggersObserver(_:)
@objc public static func addTriggersObserver(_ observer: IPSTriggersObserver)
This observer is used to receive updates regarding proximity triggers.
-
Since: 2.10.0
-
Parameters:
- observer: an object implementing
IPSTriggersObserverprotocol
removeTriggersObserver(_:)
@objc public static func removeTriggersObserver(_ observer: IPSTriggersObserver)
This method is used to remove observer and stop receiving updates regarding proximity triggers events.
-
Since: 2.10.0
-
Parameters:
- observer: an object implementing
IPSProximityEventsObserverprotocol
addProximityEventsObserver(_:)
@objc public static func addProximityEventsObserver(_ observer: IPSProximityEventsObserver)
This observer is used to receive updates regarding proximity triggers events. Updates are received for triggers on the current positioning map only.
-
Since: 2.10.0
-
Parameters:
- observer: an object implementing
IPSProximityEventsObserverprotocol
removeProximityEventsObserver(_:)
@objc public static func removeProximityEventsObserver(_ observer: IPSProximityEventsObserver)
This method is used to remove observer and stop receiving updates regarding proximity triggers events.
-
Since: 2.10.0
-
Parameters:
- observer: an object implementing
IPSProximityEventsObserverprotocol
Parameters
| Name | Description |
|---|---|
| observer | an object implementing IPSProximityEventsObserver protocol |
getCurrentRegions()
@objc public static func getCurrentRegions() -> [IPSRegion]
- Returns: A list of all the regions inside of which the user is currently located.
set(actionsQueue:)
@objc public static func set(actionsQueue: DispatchQueue)
add(localProximityEvents:)
@objc public static func add(localProximityEvents: [IPSLocalProximityEvent])
Adds the provided proximity events to the current list.
-
Since: 5.1.0
-
Parameters:
- localProximityEvents: list of new proximity events.
set(localProximityEvents:)
@objc public static func set(localProximityEvents: [IPSLocalProximityEvent])
Sets the provided proximity events instead of the current list.
-
Since: 5.1.0
-
Parameters:
- localProximityEvents: list of new proximity events.
remove(localProximityEvents:)
@objc public static func remove(localProximityEvents: [IPSLocalProximityEvent])
Removes the provided proximity events from the current list. Removing is done by reference.
-
Since: 5.1.0
-
Parameters:
- localProximityEvents: list of proximity events to remove.
Parameters
| Name | Description |
|---|---|
| localProximityEvents | list of proximity events to remove. |
removeAllLocalProximityEvents()
@objc public static func removeAllLocalProximityEvents()
Removes all the current active proximity events.
- Since: 5.1.0
removeAllLocalProximityEvents(with:)
@objc public static func removeAllLocalProximityEvents(with groupIds: [String])
Removes all the proximity events if that their groupId is in the provided list.
-
Since: 5.1.0
-
Parameters:
- groupIds: group ids to remove
add(locationVisits:)
@objc public static func add(locationVisits: [IPSLocationVisit])
Adds the provided location visits to the current list of monitored visits.
Each IPSLocationVisit will fire its onLocationVisited callback whenever
the user completes a visit to its locationDefinition on the configured
building and floor.
-
Since: 9.9.0
-
Parameters:
- locationVisits: list of location visits to add.
Parameters
| Name | Description |
|---|---|
| locationVisits | list of location visits to add. |
set(locationVisits:)
@objc public static func set(locationVisits: [IPSLocationVisit])
Replaces the current list of monitored location visits with the provided one.
Any previously registered IPSLocationVisit that is not in the new list will
stop being monitored.
-
Since: 9.9.0
-
Parameters:
- locationVisits: list of location visits to set as the new active list.
Parameters
| Name | Description |
|---|---|
| locationVisits | list of location visits to set as the new active list. |
remove(locationVisits:)
@objc public static func remove(locationVisits: [IPSLocationVisit])
Removes the provided location visits from the current list.
Removal is done by reference, so only the exact IPSLocationVisit instances
previously passed to add(locationVisits:) or set(locationVisits:) will be removed.
-
Since: 9.9.0
-
Parameters:
- locationVisits: list of location visits to remove.
Parameters
| Name | Description |
|---|---|
| locationVisits | list of location visits to remove. |
removeAllLocationVisits()
@objc public static func removeAllLocationVisits()
Removes all currently active location visits.
After this call no IPSLocationVisit.onLocationVisited callback will fire
until new visits are registered.
- Since: 9.9.0
removeAllLocationVisits(with:)
@objc public static func removeAllLocationVisits(with groupIds: [String])
Removes all location visits whose groupId is included in the provided list.
Location visits with a nil groupId are not affected.
-
Since: 9.9.0
-
Parameters:
- groupIds: group ids identifying which location visits to remove.
Parameters
| Name | Description |
|---|---|
| groupIds | group ids identifying which location visits to remove. |