Inherits from NSObject
Declared in LimeConnect.h
LimeConnect.m

Overview

LimeSDK is the main class and usually the only point of interaction of Lime with client application.

Properties

currentUser

Represents the application current user

@property (nonatomic, strong, readonly) LimeUser *currentUser

Discussion

Represents the application current user

Declared In

LimeConnect.h

enableGeofences

A property that indicates if the SDK should use generic geofencing alongside the iBeacon region monitoring. By default, this property is YES and geofencing is enabled.

@property (nonatomic, assign) BOOL enableGeofences

Discussion

A property that indicates if the SDK should use generic geofencing alongside the iBeacon region monitoring. By default, this property is YES and geofencing is enabled.

Declared In

LimeConnect.h

enableTablets

A property that indicates if the SDK should be anabled on tablets. By default, content is displayed on phones only, tablets are disabled. Basically, the major use-case is for smartphones and Lime CMS produces phone optimized content. If somebody, however, decides to create custom web campaingn for tablets and use Lime only as iBeacon interaction initializer, this flag can override the settings.

@property (nonatomic, assign) BOOL enableTablets

Discussion

A property that indicates if the SDK should be anabled on tablets. By default, content is displayed on phones only, tablets are disabled. Basically, the major use-case is for smartphones and Lime CMS produces phone optimized content. If somebody, however, decides to create custom web campaingn for tablets and use Lime only as iBeacon interaction initializer, this flag can override the settings.

Declared In

LimeConnect.h

isFetchingContext

This property is set to true in case SDK is fetching context for some APP_KEY.

@property (nonatomic, assign, readonly) BOOL isFetchingContext

Discussion

This property is set to true in case SDK is fetching context for some APP_KEY.

Declared In

LimeConnect.h

locationManager

Represents the class that is responsible for the location monitoring and delegating location updates in the beacon manager and geofence manager.

@property (nonatomic, strong, readonly) LimeLocationManager *locationManager

Discussion

Represents the class that is responsible for the location monitoring and delegating location updates in the beacon manager and geofence manager.

Declared In

LimeConnect.h

notificationDelegate

A property for a delegate responsible for the notification display.

@property (nonatomic, assign) id<LimeNotificationDelegate> notificationDelegate

Discussion

A property for a delegate responsible for the notification display.

Declared In

LimeConnect.h

Class Methods

sharedInstance

Returns a shared instance of the Lime object. This is the default method for obtaining a Lime instance.

+ (LimeConnect *)sharedInstance

Return Value

A shared instance of Lime object.

Discussion

Returns a shared instance of the Lime object. This is the default method for obtaining a Lime instance.

Declared In

LimeConnect.h

version

Return the version of the SDK API. API is versioned by three components, such as X.Y.Z (1.0.2). The first component X represents major version, Y represents minor version and Z represents bugfix version.

+ (NSString *)version

Return Value

Version of the API.

Discussion

Return the version of the SDK API. API is versioned by three components, such as X.Y.Z (1.0.2). The first component X represents major version, Y represents minor version and Z represents bugfix version.

Declared In

LimeConnect.h

Instance Methods

currentContent

Returns all currently held content information for all beacons that are in range.

- (NSArray *)currentContent

Return Value

NSArray with instances of LimeContentRule object.

Discussion

Returns all currently held content information for all beacons that are in range.

Declared In

LimeConnect.h

currentContentForLimeBeacon:

Returns all currently held content information for beacon specified in the parameter.

- (NSArray *)currentContentForLimeBeacon:(LimeBeacon *)beacon

Parameters

beacon

Instance of LimeBeacon representing a beacon for which to return content.

Return Value

NSArray with instances of LimeContentRule object.

Discussion

Returns all currently held content information for beacon specified in the parameter.

Declared In

LimeConnect.h

currentContentForLimeBeaconList:

Returns all currently held content information for beacon list specified in the parameter.

- (NSArray *)currentContentForLimeBeaconList:(NSArray *)beaconList

Parameters

beaconList

NSArray of LimeBeacon objects representing beacons for which to return content.

Return Value

NSArray with instances of LimeContentRule object.

Discussion

Returns all currently held content information for beacon list specified in the parameter.

Declared In

LimeConnect.h

fetchContentForBeacons:callback:

Fetches content for beacons specified in the beacons list and returns the result via the content. Uses APP_KEY to determine the content in the background, since one beacon can have multiple contents for various apps.

- (void)fetchContentForBeacons:(NSArray *)beacons callback:(LimeContentRuleCallback)callback

Parameters

beacons

Beacons for which to fetch content.

callback

A callback that receives content rules for given beacons.

Discussion

Fetches content for beacons specified in the beacons list and returns the result via the content. Uses APP_KEY to determine the content in the background, since one beacon can have multiple contents for various apps.

Declared In

LimeConnect.h

handleAppLaunch:

This method should be called in the application delegate in order to display the content specified by the parameter in the local notification. Content opens in the default user interface as soon as the local notification is delivered on found iBeacon instance.

- (void)handleAppLaunch:(UILocalNotification *)localNotif

Parameters

localNotif

Local notification that holds the information about the iBeacon related content.

Discussion

This method should be called in the application delegate in order to display the content specified by the parameter in the local notification. Content opens in the default user interface as soon as the local notification is delivered on found iBeacon instance.

This method should be added in two places in the application delegate in order to do the job properly:

  • application:didFinishLaunchingWithOptions:
  • application:didReceiveLocalNotification

Declared In

LimeConnect.h

startFetchingContextForApplicationKey:

Starts monitoring beacon regions for application with given APP_KEY attribute. Whenever a list of beacons is obtained, server is automatically asked to return content for given beacon list. When this list is obtained, the content data is returned via the callback.

- (void)startFetchingContextForApplicationKey:(NSString *)appKey

Parameters

appKey

An application key APP_KEY for which to start monitoring beacons.

Discussion

Starts monitoring beacon regions for application with given APP_KEY attribute. Whenever a list of beacons is obtained, server is automatically asked to return content for given beacon list. When this list is obtained, the content data is returned via the callback.

This method should be used when you want Lime SDK to do everything - fetching the content for found beacons and presenting the content via the default user interface.

Declared In

LimeConnect.h

startFetchingContextForApplicationKey:beaconListCallback:

Starts monitoring beacon regions for application with given APP_KEY attribute. Whenever a list of beacons is obtained, it is passed in the callback.

- (void)startFetchingContextForApplicationKey:(NSString *)appKey beaconListCallback:(BeaconVisibilityStatusChange)beaconListCallback

Parameters

appKey

An application key APP_KEY for which to start monitoring beacon regions.

beaconListCallback

A callback that receives info about lost and found beacons.

Discussion

Starts monitoring beacon regions for application with given APP_KEY attribute. Whenever a list of beacons is obtained, it is passed in the callback.

This method should be used when you only want to get the list of beacons from the Lime SDK in order to handle the beacon action yourself.

Method calls startFetchingContextForApplicationKey:beaconListCallback:geofenceListCallback with nil geofence list callback.

Declared In

LimeConnect.h

startFetchingContextForApplicationKey:beaconListCallback:geofenceListCallback:

Starts monitoring beacon regions and geofences for application with given APP_KEY attribute. Whenever a list of beacons or geofences is obtained, it is passed in the callback.

- (void)startFetchingContextForApplicationKey:(NSString *)appKey beaconListCallback:(BeaconVisibilityStatusChange)beaconListCallback geofenceListCallback:(GeofenceVisibilityStatusChange)geofenceListCallback

Parameters

appKey

An application key APP_KEY for which to start monitoring beacon regions.

beaconListCallback

A callback that receives info about lost and found beacons.

geofenceListCallback

A callback that receives info about lost and found geofences.

Discussion

Starts monitoring beacon regions and geofences for application with given APP_KEY attribute. Whenever a list of beacons or geofences is obtained, it is passed in the callback.

This method should be used when you only want to get the list of beacons or geofences from the Lime SDK in order to handle the beacon or geofence related action yourself.

Declared In

LimeConnect.h

startFetchingContextForApplicationKey:contentUpdatedCallback:

Starts monitoring beacon regions for application with given APP_KEY attribute. Whenever a list of beacons is obtained, server is automatically asked to return content for given beacon list. When this list is obtained, the content data is returned via the callback.

- (void)startFetchingContextForApplicationKey:(NSString *)appKey contentUpdatedCallback:(LimeContentUpdatedCallback)contentUpdatedCallback

Parameters

appKey

An application key APP_KEY for which to start monitoring beacons and content.

contentUpdatedCallback

A callback that receives info about lost and found content

Discussion

Starts monitoring beacon regions for application with given APP_KEY attribute. Whenever a list of beacons is obtained, server is automatically asked to return content for given beacon list. When this list is obtained, the content data is returned via the callback.

This method should be used when you only want to get the list of content for found beacon from the Lime SDK in order to present your content yourself.

Declared In

LimeConnect.h

startRangingBeacons

Starts ranging for iBeacons actively.

- (void)startRangingBeacons

Discussion

Starts ranging for iBeacons actively.

Declared In

LimeConnect.h

stopFetchingContext

Cancels all operations that were started earlier and clears all iBeacon regions.

- (void)stopFetchingContext

Discussion

Cancels all operations that were started earlier and clears all iBeacon regions.

Declared In

LimeConnect.h

stopRangingBeacons

Stops ranging for iBeacons actively.

- (void)stopRangingBeacons

Discussion

Stops ranging for iBeacons actively.

Declared In

LimeConnect.h