LimeGeofenceManager Class Reference
Inherits from | NSObject |
Declared in | LimeGeofenceManager.h LimeGeofenceManager.m |
Overview
A manager class responsible for maintaining list of currently visible geofences and for providing callbacks about the geofence visibility change.
Tasks
-
geofences
property -
location
property -
– initWithLocationManager:
-
– startListeningForGeofencesForAppKey:visibilityStatusChange:
-
– startListeningForGeofences:geofenceVisibilityStatusChange:
-
– restartListeningForGeofences
-
– stopListeningForGeofences
-
– didUpdateGeofenceRegion:state:
-
– didUpdateLocations:
Properties
Instance Methods
didUpdateGeofenceRegion:state:
A callback that is sent by the LimeLocationManager in case region state changes.
- (void)didUpdateGeofenceRegion:(CLRegion *)region state:(CLRegionState)state
Parameters
- region
Circular region that was updated.
- state
State of the updated region.
Discussion
A callback that is sent by the LimeLocationManager in case region state changes.
Declared In
LimeGeofenceManager.h
didUpdateLocations:
A callback that is sent by the LimeLocationManager in case location changes.
- (void)didUpdateLocations:(NSArray *)locations
Parameters
- locations
Last locations as returned by the CLLocationManager instance.
Discussion
A callback that is sent by the LimeLocationManager in case location changes.
Declared In
LimeGeofenceManager.h
initWithLocationManager:
Init a new geofence manager instance passing the single location manager.
- (instancetype)initWithLocationManager:(LimeLocationManager *)locationManager
Parameters
- locationManager
Location manager that is responsible for location related callbacks.
Return Value
A new instance of a geofence manager.
Discussion
Init a new geofence manager instance passing the single location manager.
Declared In
LimeGeofenceManager.h
restartListeningForGeofences
If geofence monotoring was stopped, this method restarts it without a configuration change.
- (void)restartListeningForGeofences
Discussion
If geofence monotoring was stopped, this method restarts it without a configuration change.
Declared In
LimeGeofenceManager.h
startListeningForGeofences:geofenceVisibilityStatusChange:
Starts listening for geofences with given radius and coordinate and passes any changes of currently visible geofences via the callback block.
- (void)startListeningForGeofences:(NSArray *)geofences geofenceVisibilityStatusChange:(GeofenceVisibilityStatusChange)geofenceVisibilityStatusChange
Parameters
- geofences
List of geofences to be monitored. It is important geofences have their Lime CMS identifier (“rid”) - geofences without non-null rid are skipped.
- geofenceVisibilityStatusChange
A callback that receives found, stale or lost geofences instances (LimeGeofence class).
Discussion
Starts listening for geofences with given radius and coordinate and passes any changes of currently visible geofences via the callback block.
Declared In
LimeGeofenceManager.h
startListeningForGeofencesForAppKey:visibilityStatusChange:
Starts updating the list of currently monitored geofences and delivers callbacks via the geofence visibility status change callback.
- (void)startListeningForGeofencesForAppKey:(NSString *)appKey visibilityStatusChange:(GeofenceVisibilityStatusChange)geofenceVisibilityStatusChange
Parameters
- appKey
An app key used for geofence updates.
- geofenceVisibilityStatusChange
A callback that receives found, stale or lost geofences instances (LimeGeofence class).
Discussion
Starts updating the list of currently monitored geofences and delivers callbacks via the geofence visibility status change callback.
Declared In
LimeGeofenceManager.h