Inherits from LimeObject : NSObject
Conforms to LimeRegionObjectProtocol
NSCoding
Declared in LimeGeofence.h
LimeGeofence.m

Overview

Class representing a circular geofence object - a region defined by a GPS coordinate and radius.

Properties

distance

Last known distance of the beacon from the mobile device.

@property (nonatomic, assign) double distance

Discussion

Last known distance of the beacon from the mobile device.

Declared In

LimeGeofence.h

lastSeenTimestamp

Timestamp of this beacon, last time beacon was seen

@property (nonatomic, strong) NSDate *lastSeenTimestamp

Discussion

Timestamp of this beacon, last time beacon was seen

Declared In

LimeGeofence.h

latitude

GPS latitude representing the center of the circular geofence.

@property (nonatomic, strong) NSNumber *latitude

Discussion

GPS latitude representing the center of the circular geofence.

Declared In

LimeGeofence.h

longitude

GPS longitude representing the center of the circular geofence.

@property (nonatomic, strong) NSNumber *longitude

Discussion

GPS longitude representing the center of the circular geofence.

Declared In

LimeGeofence.h

radius

Radius measured in metres from the center of the circular geofence.

@property (nonatomic, strong) NSNumber *radius

Discussion

Radius measured in metres from the center of the circular geofence.

Declared In

LimeGeofence.h

rid

Record ID - can be assigned only if object is returned from the API and backed by a DB record.

@property (nonatomic, strong) NSNumber *rid

Discussion

Record ID - can be assigned only if object is returned from the API and backed by a DB record.

Declared In

LimeGeofence.h

Instance Methods

distanceUsingContext:

Compute a distance from the region entity using a provided context object, such as an instance of CLBeacon or CLLocation representing the current user location. Distance is always calculated from the center of the region entity to the location provided by context.

- (CLLocationDistance)distanceUsingContext:(id)context

Parameters

context

A context used for computing the distance from (such as current location or beacon information.

Return Value

Distance from the region entity using a provided context object.

Discussion

Compute a distance from the region entity using a provided context object, such as an instance of CLBeacon or CLLocation representing the current user location. Distance is always calculated from the center of the region entity to the location provided by context.

Declared In

LimeObject.h

identifierLookup

Identifier used for a unique region entity lookup - for iBeacon, this may be a derivative of uuid, major and minor, for geofence, this must be a geofence rid.

- (NSString *)identifierLookup

Return Value

Identifier used for a unique region entity lookup.

Discussion

Identifier used for a unique region entity lookup - for iBeacon, this may be a derivative of uuid, major and minor, for geofence, this must be a geofence rid.

Declared In

LimeObject.h

identifierType

Identifier of a region entity type. These are the values used by individual entities: “ibeacon” for iBeacons, “geofence” for geofences.

- (NSString *)identifierType

Return Value

Identifier of a region entity type.

Discussion

Identifier of a region entity type. These are the values used by individual entities: “ibeacon” for iBeacons, “geofence” for geofences.

Declared In

LimeObject.h

initWithDictionary:

Initialize an object with the contents of the dictionary.

- (id)initWithDictionary:(NSDictionary *)dictionary

Parameters

dictionary

An NSDictionary to be used for initializing object properties.

Return Value

This implementation of method alway raises an exception - subclass must override this method.

Discussion

Initialize an object with the contents of the dictionary.

WARNING: The default implementation in LimeObject class raises an exception. Make sure you override the method in your subclasses.

Declared In

LimeObject.h