GeofenceManager
public class GeofenceManager : GeofenceApi, GeofenceCallback
extension GeofenceManager: CoreGeofenceCallback
-
Static variable to provide access to class
Declaration
Swift
public static let shared: GeofenceManager
-
Add a GeofenceTrigger for a property
Declaration
Swift
public func addGeofenceTrigger(propertyId: Int, geofenceTrigger: GeofenceTrigger) -> Bool
Parameters
propertyId
An identifier for the property
geofenceTrigger
The Geofence trigger to associate with property
-
Add multiple GeofenceTriggers at once for a property
Declaration
Swift
public func addGeofenceTriggers(propertyId: Int, geofenceTriggers: [GeofenceTrigger]) -> Bool
Parameters
propertyId
An identifier for the property
geofenceTriggers
List of Geofence triggers to associate with property
-
Remove a specific GeofenceTrigger from a property
Declaration
Swift
public func removeGeofenceTrigger(propertyId: Int, geofenceId: String) -> Bool
Parameters
propertyId
An identifier for the property
geofenceTrigger
The Geofence trigger to remove from property
-
Remove all GeofenceTriggers from a property
Declaration
Swift
public func removeAllGeofenceTriggers(propertyId: Int) -> Bool
Parameters
propertyId
An identifier for the property
-
Add a listener to GeofenceTrigger call back events
Declaration
Swift
public func addListener(geofenceCallback: GeofenceCallback)
Parameters
geofenceCallback
The callback to register as listener for Geofence events
-
Remove a listener to GeofenceTrigger call back events
Declaration
Swift
public func removeListener(geofenceCallback: GeofenceCallback) -> Bool
Parameters
geofenceCallback
The callback to remove as listener for Geofence events
-
Callback method for when a geofence is triggered
Declaration
Swift
public func onGeofenceTriggered(propertyId: Int, geofenceId: String)
Parameters
propertyId
An identifier for the property
geofenceId
An identifier for the geofence that fired.