LimeConnect Class Reference
| 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.
Tasks
-
notificationDelegateproperty -
enableTabletsproperty -
enableGeofencesproperty -
isFetchingContextproperty -
currentUserproperty -
locationManagerproperty -
+ sharedInstance -
+ version -
– startFetchingContextForApplicationKey:beaconListCallback: -
– startFetchingContextForApplicationKey:beaconListCallback:geofenceListCallback: -
– startFetchingContextForApplicationKey:contentUpdatedCallback: -
– startFetchingContextForApplicationKey: -
– stopFetchingContext -
– fetchContentForBeacons:callback: -
– currentContent -
– currentContentForLimeBeacon: -
– currentContentForLimeBeaconList: -
– handleAppLaunch: -
– startRangingBeacons -
– stopRangingBeacons
Properties
currentUser
Represents the application current user
@property (nonatomic, strong, readonly) LimeUser *currentUserDiscussion
Represents the application current user
Declared In
LimeConnect.henableGeofences
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 enableGeofencesDiscussion
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.henableTablets
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 enableTabletsDiscussion
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.hisFetchingContext
This property is set to true in case SDK is fetching context for some APP_KEY.
@property (nonatomic, assign, readonly) BOOL isFetchingContextDiscussion
This property is set to true in case SDK is fetching context for some APP_KEY.
Declared In
LimeConnect.hlocationManager
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 *locationManagerDiscussion
Represents the class that is responsible for the location monitoring and delegating location updates in the beacon manager and geofence manager.
Declared In
LimeConnect.hClass Methods
sharedInstance
Returns a shared instance of the Lime object. This is the default method for obtaining a Lime instance.
+ (LimeConnect *)sharedInstanceReturn 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.hversion
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 *)versionReturn 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.hInstance Methods
currentContent
Returns all currently held content information for all beacons that are in range.
- (NSArray *)currentContentReturn Value
NSArray with instances of LimeContentRule object.
Discussion
Returns all currently held content information for all beacons that are in range.
Declared In
LimeConnect.hcurrentContentForLimeBeacon:
Returns all currently held content information for beacon specified in the parameter.
- (NSArray *)currentContentForLimeBeacon:(LimeBeacon *)beaconParameters
- 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.hcurrentContentForLimeBeaconList:
Returns all currently held content information for beacon list specified in the parameter.
- (NSArray *)currentContentForLimeBeaconList:(NSArray *)beaconListParameters
- 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.hfetchContentForBeacons: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)callbackParameters
- 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.hhandleAppLaunch:
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 *)localNotifParameters
- 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.hstartFetchingContextForApplicationKey:
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 *)appKeyParameters
- 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.hstartFetchingContextForApplicationKey: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)beaconListCallbackParameters
- 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.hstartFetchingContextForApplicationKey: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)geofenceListCallbackParameters
- 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.hstartFetchingContextForApplicationKey: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)contentUpdatedCallbackParameters
- 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.hstartRangingBeacons
Starts ranging for iBeacons actively.
- (void)startRangingBeaconsDiscussion
Starts ranging for iBeacons actively.
Declared In
LimeConnect.h