ISGeofenceProvider Class Reference

Inherits from NSObject
Declared in ISGeofenceProvider.h

Overview

This class handles the geofencing process. You can retrieve an instance of it by calling getModule:GEOFENCING on your location provider. It provides a way to be notified when location is detected in a certain area (see ISGeofenceZone), defined on Insiteo servers. To use this class, you just have to call setDelegate(ISGeofenceDelegate), and start the location. The delegate will then receive notification each time location enter/stay/leave an area.

  delegate

Geofencing notifications delegate.

@property (weak) id<ISGeofenceDelegate> delegate

Declared In

ISGeofenceProvider.h

  isInitialized

Boolean use to know if the provider is initialized.

@property (nonatomic, readonly) Boolean isInitialized

Declared In

ISGeofenceProvider.h

  areas

@property (nonatomic, readonly) NSDictionary *areas

  renderer

Geofence area Renderer.

@property (nonatomic, readonly) ISGeofenceAreaRenderer *renderer

Declared In

ISGeofenceProvider.h

– geofenceAreaExistsWithGuid:

Method used to know if a ISGeofenceArea exists with a specified guid.

- (Boolean)geofenceAreaExistsWithGuid:(NSString *)guid

Parameters

guid

Corresponding area guid.

Return Value

YES if the area already exists; otherwise NO.

Declared In

ISGeofenceProvider.h

– geofenceAreaExistsWithZoneId:

Method used to know if a ISGeofenceArea exists with a specified zone identifier.

- (Boolean)geofenceAreaExistsWithZoneId:(int)zoneId

Parameters

zoneId

Corresponding area zone identifier.

Return Value

YES if the area already exists; otherwise NO.

Declared In

ISGeofenceProvider.h

– geofenceAreaExistsWithZonePoi:

Method used to know if a ISGeofenceArea exists with a specified Zone/Poi association.

- (Boolean)geofenceAreaExistsWithZonePoi:(ISZonePoi *)zonePoi

Parameters

zonePoi

Zone/Poi association.

Return Value

YES if the area already exists; otherwise NO.

Declared In

ISGeofenceProvider.h

– geofenceAreaExistsWithArea:

Method used to know if a ISGeofenceArea exists.

- (Boolean)geofenceAreaExistsWithArea:(ISGeofenceArea *)area

Parameters

area

Corresponding area.

Return Value

YES if the area already exists; otherwise NO.

Declared In

ISGeofenceProvider.h

– addGeofenceAreaWithZoneId:andLabel:andMessage:

Equivalent to addGeofenceAreaWithZoneId:andContent:andEnterEnabled:andEnteredTime:andStayedEnabled:andStayedTime:andLeaveEnabled:andLeaveTime:andDefaultGeoWidth: with the following values polygon = nil, defaultGeoWidth = value defined in geoPush.csv, enteredEnabled = stayedEnabled = leaveEnabled = value defined in geoPush.csv and enteredTime = stayedTime = leaveTime = value defined in geoPush.csv.

- (ISGeofenceArea *)addGeofenceAreaWithZoneId:(int)zoneId andLabel:(NSString *)label andMessage:(NSString *)message

Parameters

zoneId

zone identifier.

label

A label that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

message

A message that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

Declared In

ISGeofenceProvider.h

– addGeofenceAreaWithZoneId:andPolygon:andLabel:andMessage:

Equivalent to addGeofenceAreaWithZoneId:andContent:andEnterEnabled:andEnteredTime:andStayedEnabled:andStayedTime:andLeaveEnabled:andLeaveTime:andDefaultGeoWidth: with the following values defaultGeoWidth = value defined in geoPush.csv, enteredEnabled = stayedEnabled = leaveEnabled = value defined in geoPush.csv and enteredTime = stayedTime = leaveTime = value defined in geoPush.csv.

- (ISGeofenceArea *)addGeofenceAreaWithZoneId:(int)zoneId andPolygon:(NSArray *)polygon andLabel:(NSString *)label andMessage:(NSString *)message

Parameters

zoneId

zone identifier.

polygon

Wanted polygon (NSArray of ISPosition). If nil the used polygon will be set according to the geopush default area generation.

label

A label that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

message

A message that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

Declared In

ISGeofenceProvider.h

– addGeofenceAreaWithZoneId:andPolygon:andLabel:andMessage:andEventTime:

Equivalent to addGeofenceAreaWithZoneId:andContent:andEnterEnabled:andEnteredTime:andStayedEnabled:andStayedTime:andLeaveEnabled:andLeaveTime:andDefaultGeoWidth: with the following values defaultGeoWidth = value defined in geoPush.csv and enteredEnabled = stayedEnabled = leaveEnabled = value defined in geoPush.csv.

- (ISGeofenceArea *)addGeofenceAreaWithZoneId:(int)zoneId andPolygon:(NSArray *)polygon andLabel:(NSString *)label andMessage:(NSString *)message andEventTime:(float)eventTime

Parameters

zoneId

zone identifier.

polygon

Wanted polygon (NSArray of ISPosition). If nil the used polygon will be set according to the geopush default area generation.

label

A label that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

message

A message that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

eventTime

The time used to trigged the geofencing events.

Declared In

ISGeofenceProvider.h

– addGeofenceAreaWithZoneId:andPolygon:andLabel:andMessage:andEnterEnabled:andEnterTime:andStayEnabled:andStayTime:andLeaveEnabled:andLeaveTime:andDefaultGeoWidth:

Creates a new ISGeofenceArea for the given zone. The area will be constructed with the given parameters.

- (ISGeofenceArea *)addGeofenceAreaWithZoneId:(int)zoneId andPolygon:(NSArray *)polygon andLabel:(NSString *)label andMessage:(NSString *)message andEnterEnabled:(Boolean)enterEnabled andEnterTime:(float)enterTime andStayEnabled:(Boolean)stayEnabled andStayTime:(float)stayTime andLeaveEnabled:(Boolean)leaveEnabled andLeaveTime:(float)leaveTime andDefaultGeoWidth:(float)defaultGeoWidth

Parameters

zoneId

zone identifier.

polygon

Wanted polygon (NSArray of ISPosition). If nil the used polygon will be set according to the geopush default area generation.

label

A label that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

message

A message that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

enterEnabled

True if entered event should be enabled.

enterTime

The threshold time to trigger the entered event.

stayEnabled

True if stayed event should be enabled.

stayTime

The threshold time to trigger the stayed event.

leaveEnabled

True if leave event should be enabled.

leaveTime

The threshold time to trigger the leave event.

defaultGeoWidth

The default geofence depth.

Declared In

ISGeofenceProvider.h

– addGeofenceAreaWithZonePoi:andLabel:andMessage:

Equivalent to addGeofenceAreaWithZonePoi:andContent:andEnterEnabled:andEnteredTime:andStayedEnabled:andStayedTime:andLeaveEnabled:andLeaveTime:andDefaultGeoWidth: with the following values polygon = nil, defaultGeoWidth = value defined in geoPush.csv, enteredEnabled = stayedEnabled = leaveEnabled = value defined in geoPush.csv and enteredTime = stayedTime = leaveTime = value defined in geoPush.csv.

- (ISGeofenceArea *)addGeofenceAreaWithZonePoi:(ISZonePoi *)zonePoi andLabel:(NSString *)label andMessage:(NSString *)message

Parameters

zonePoi

Related Zone/Poi association (could be nil).

label

A label that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

message

A message that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

Declared In

ISGeofenceProvider.h

– addGeofenceAreaWithZonePoi:andPolygon:andLabel:andMessage:

Equivalent to addGeofenceAreaWithZonePoi:andContent:andEnterEnabled:andEnteredTime:andStayedEnabled:andStayedTime:andLeaveEnabled:andLeaveTime:andDefaultGeoWidth: with the following values defaultGeoWidth = value defined in geoPush.csv, enteredEnabled = stayedEnabled = leaveEnabled = value defined in geoPush.csv and enteredTime = stayedTime = leaveTime = value defined in geoPush.csv.

- (ISGeofenceArea *)addGeofenceAreaWithZonePoi:(ISZonePoi *)zonePoi andPolygon:(NSArray *)polygon andLabel:(NSString *)label andMessage:(NSString *)message

Parameters

zonePoi

Related Zone/Poi association (could be nil).

polygon

Wanted polygon (NSArray of ISPosition). If nil the used polygon will be set according to the geopush default area generation.

label

A label that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

message

A message that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification..

Declared In

ISGeofenceProvider.h

– addGeofenceAreaWithZonePoi:andPolygon:andLabel:andMessage:andEventTime:

Equivalent to addGeofenceAreaWithZonePoi:andContent:andEnterEnabled:andEnteredTime:andStayedEnabled:andStayedTime:andLeaveEnabled:andLeaveTime:andDefaultGeoWidth: with the following values defaultGeoWidth = value defined in geoPush.csv and enteredEnabled = stayedEnabled = leaveEnabled = value defined in geoPush.csv.

- (ISGeofenceArea *)addGeofenceAreaWithZonePoi:(ISZonePoi *)zonePoi andPolygon:(NSArray *)polygon andLabel:(NSString *)label andMessage:(NSString *)message andEventTime:(float)eventTime

Parameters

zonePoi

Related Zone/Poi association (could be nil).

polygon

Wanted polygon (NSArray of ISPosition). If nil the used polygon will be set according to the geopush default area generation.

label

A label that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

message

A message that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

eventTime

The time used to trigged the geofencing events.

Declared In

ISGeofenceProvider.h

– addGeofenceAreaWithZonePoi:andPolygon:andLabel:andMessage:andEnterEnabled:andEnterTime:andStayEnabled:andStayTime:andLeaveEnabled:andLeaveTime:andDefaultGeoWidth:

Creates a new ISGeofenceArea for the given Zone/Poi association. The area will be constructed with the given parameters.

- (ISGeofenceArea *)addGeofenceAreaWithZonePoi:(ISZonePoi *)zonePoi andPolygon:(NSArray *)polygon andLabel:(NSString *)label andMessage:(NSString *)message andEnterEnabled:(Boolean)enterEnabled andEnterTime:(float)enterTime andStayEnabled:(Boolean)stayEnabled andStayTime:(float)stayTime andLeaveEnabled:(Boolean)leaveEnabled andLeaveTime:(float)leaveTime andDefaultGeoWidth:(float)defaultGeoWidth

Parameters

zonePoi

Related Zone/Poi association (could be nil).

polygon

Wanted polygon (NSArray of ISPosition). If nil the used polygon will be set according to the geopush default area generation.

label

A label that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

message

A message that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

enterEnabled

True if entered event should be enabled.

enterTime

The threshold time to trigger the entered event.

stayEnabled

True if stayed event should be enabled.

stayTime

The threshold time to trigger the stayed event.

leaveEnabled

True if leave event should be enabled.

leaveTime

The threshold time to trigger the leave event.

defaultGeoWidth

The default geofence depth.

Declared In

ISGeofenceProvider.h

– addGeofenceAreaWithGUID:andCenter:andLabel:andMessage:

Equivalent to addGeofenceAreaWithGUID:andCenter:andContent:andEnterEnabled:andEnteredTime:andStayedEnabled:andStayedTime:andLeaveEnabled:andLeaveTime:andSize: with the following values size = 4 * ISGeoPushDefaultCustomGeoWidth, enteredEnabled = stayedEnabled = leaveEnabled = true and enteredTime = stayedTime = leaveTime = ISGeoPushDefaultEventTime.

- (ISGeofenceArea *)addGeofenceAreaWithGUID:(NSString *)guid andCenter:(ISPosition *)center andLabel:(NSString *)label andMessage:(NSString *)message

Parameters

guid

The guid that should be used for the new ISGeofenceArea. Guid can not be null or empty!

center

The center of the ISGeofenceArea.

label

A label that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

message

A message that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

Return Value

The created ISGeofenceArea or null if it was not properly created.

Declared In

ISGeofenceProvider.h

– addGeofenceAreaWithGUID:andCenter:andLabel:andMessage:andEventTime:

Equivalent to addGeofenceAreaWithGUID:andCenter:andContent:andEnterEnabled:andEnteredTime:andStayedEnabled:andStayedTime:andLeaveEnabled:andLeaveTime:andSize: with the following values size = 4 * ISGeoPushDefaultCustomGeoWidth, enteredEnabled = stayedEnabled = leaveEnabled = true and enteredTime = stayedTime = leaveTime = eventTime.

- (ISGeofenceArea *)addGeofenceAreaWithGUID:(NSString *)guid andCenter:(ISPosition *)center andLabel:(NSString *)label andMessage:(NSString *)message andEventTime:(float)eventTime

Parameters

guid

The guid that should be used for the new ISGeofenceArea. Guid can not be null or empty!

center

The center of the ISGeofenceArea.

label

A label that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

message

A message that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

eventTime

The time used to trigged the geofencing events.

Return Value

The created ISGeofenceArea or null if it was not properly created.

Declared In

ISGeofenceProvider.h

– addGeofenceAreaWithGUID:andCenter:andLabel:andMessage:andEnterEnabled:andEnteredTime:andStayedEnabled:andStayedTime:andLeaveEnabled:andLeaveTime:

Equivalent to addGeofenceAreaWithGUID:andCenter:andContent:andEnterEnabled:andEnteredTime:andStayedEnabled:andStayedTime:andLeaveEnabled:andLeaveTime:andSize: with the following values size = 4 * ISGeoPushDefaultCustomGeoWidth.

- (ISGeofenceArea *)addGeofenceAreaWithGUID:(NSString *)guid andCenter:(ISPosition *)center andLabel:(NSString *)label andMessage:(NSString *)message andEnterEnabled:(Boolean)enteredEnabled andEnteredTime:(float)enteredTime andStayedEnabled:(Boolean)stayedEnabled andStayedTime:(float)stayedTime andLeaveEnabled:(Boolean)leaveEnabled andLeaveTime:(float)leaveTime

Parameters

guid

The guid that should be used for the new ISGeofenceArea. Guid can not be null or empty!

center

The center of the ISGeofenceArea.

label

A label that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

message

A message that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

enteredEnabled

True if entered event should be enabled.

enteredTime

The threshold time to trigger the entered event.

stayedEnabled

True if stayed event should be enabled.

stayedTime

The threshold time to trigger the stayed event.

leaveEnabled

True if leave event should be enabled.

leaveTime

The threshold time to trigger the leave event.

Return Value

The created ISGeofenceArea or null if it was not properly created.

Declared In

ISGeofenceProvider.h

– addGeofenceAreaWithGUID:andCenter:andLabel:andMessage:andSize:

Equivalent to addGeofenceAreaWithGUID:andCenter:andContent:andEnterEnabled:andEnteredTime:andStayedEnabled:andStayedTime:andLeaveEnabled:andLeaveTime:andSize: with the following values enteredEnabled = stayedEnabled = leaveEnabled = true and enteredTime = stayedTime = leaveTime = ISGeoPushDefaultEventTime.

- (ISGeofenceArea *)addGeofenceAreaWithGUID:(NSString *)guid andCenter:(ISPosition *)center andLabel:(NSString *)label andMessage:(NSString *)message andSize:(float)size

Parameters

guid

The guid that should be used for the new ISGeofenceArea. Guid can not be null or empty!

center

The center of the ISGeofenceArea.

label

A label that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

message

A message that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

size

The size for the square.

Declared In

ISGeofenceProvider.h

– addGeofenceAreaWithGUID:andCenter:andLabel:andMessage:andEventTime:andSize:

Equivalent to addGeofenceAreaWithGUID:andCenter:andContent:andEnterEnabled:andEnteredTime:andStayedEnabled:andStayedTime:andLeaveEnabled:andLeaveTime:andSize: with the following values enteredEnabled = stayedEnabled = leaveEnabled = true and enteredTime = stayedTime = leaveTime = eventTime.

- (ISGeofenceArea *)addGeofenceAreaWithGUID:(NSString *)guid andCenter:(ISPosition *)center andLabel:(NSString *)label andMessage:(NSString *)message andEventTime:(float)eventTime andSize:(float)size

Parameters

guid

The guid that should be used for the new ISGeofenceArea. Guid can not be null or empty!

center

The center of the ISGeofenceArea.

label

A label that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

message

A message that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

eventTime

The time used to trigged the geofencing events.

size

The size for the square.

Return Value

The created GeofenceArea or null if it was not properly created.

Declared In

ISGeofenceProvider.h

– addGeofenceAreaWithGUID:andCenter:andLabel:andMessage:andEnterEnabled:andEnteredTime:andStayedEnabled:andStayedTime:andLeaveEnabled:andLeaveTime:andSize:

Creates a new ISGeofenceArea around the given Position. The area will be a square constructed with the given size.

- (ISGeofenceArea *)addGeofenceAreaWithGUID:(NSString *)guid andCenter:(ISPosition *)center andLabel:(NSString *)label andMessage:(NSString *)message andEnterEnabled:(Boolean)enteredEnabled andEnteredTime:(float)enteredTime andStayedEnabled:(Boolean)stayedEnabled andStayedTime:(float)stayedTime andLeaveEnabled:(Boolean)leaveEnabled andLeaveTime:(float)leaveTime andSize:(float)size

Parameters

guid

The guid that should be used for the new GeofenceArea. Guid can not be nil or empty!

center

The center of the GeofenceArea.

label

A label that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

message

A message that can be retrieved when the corresponding ISGeofenceArea fires and that can be used for your custom notification.

enteredEnabled

True if entered event should be enabled.

enteredTime

The threshold time to trigger the entered event.

stayedEnabled

True if stayed event should be enabled.

stayedTime

The threshold time to trigger the stayed event.

leaveEnabled

True if leave event should be enabled.

leaveTime

The threshold time to trigger the leave event.

size

The size for the square.

Return Value

The created GeofenceArea or nil if it was not properly created.

Declared In

ISGeofenceProvider.h

– removeGeofenceAreaWithGuid:

Method used to remove a ISGeofenceArea according to its guid.

- (void)removeGeofenceAreaWithGuid:(NSString *)guid

Parameters

guid

Corresponding area guid to remove.

Declared In

ISGeofenceProvider.h

– removeGeofenceAreaWithZoneId:

Method used to remove a ISGeofenceArea according to a zone identifier.

- (void)removeGeofenceAreaWithZoneId:(int)zoneId

Parameters

zoneId

Corresponding zone identifier to remove from.

Declared In

ISGeofenceProvider.h

– removeGeofenceAreaWithZonePoi:

Method used to remove a ISGeofenceArea according to a Zone/Poi association.

- (void)removeGeofenceAreaWithZonePoi:(ISZonePoi *)zonePoi

Parameters

zonePoi

Corresponding Zone/Poi association to remove from.

Declared In

ISGeofenceProvider.h

– removeGeofenceAreaWithArea:

Method used to remove a ISGeofenceArea.

- (void)removeGeofenceAreaWithArea:(ISGeofenceArea *)area

Parameters

area

Area to remove.

Declared In

ISGeofenceProvider.h