LimeConnectSDK 1.5.3

LimeConnectSDK 1.5.3

TestsTested
LangLanguage Obj-CObjective C
License Custom
ReleasedLast Release Aug 2015

Maintained by Petr Dvorak.



 
Depends on:
AFNetworking~> 2.3
SDWebImage~> 3.6
 

Lime Connect SDK for iOS

In order to connect your mobile application to the content you created at Lime Connect, you must follow couple simple steps. This manual describes couple scenarios of the SDK integration. Advanced SDK options are described in our API reference.

Installation

Lime Connect SDK is available through CocoaPods, a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like Lime Connect SDK in your projects.

To install Lime Connect SDK for iOS, simply add the following lines to your Podfile:

platform :ios, "7.0"
pod 'LimeConnectSDK'

Alternatively, you can manually download our SDK package (classes and assets from the Pod folder) and add it to your iOS project using drag&drop.

In order to make the Lime Connect SDK work, you need to change your Info.plist file in order to declare the location services, that are needed for the CoreLocation (iBeacon support is part of CoreLocation). Add the NSLocationAlwaysUsageDescription key (String). The value of this key should be a text explaing the purpose of using the iBeacons within your application. User decides if he/she grants permissions to the application based on this text.

Example of an explanatory text:

"In order to automatically show you a discount voucher after you enter our store, we need to be able to determine your location even if you are not actively using your application."

Basic SDK integration

The simples use-case for the Lime Connect SDK is an automated proximity based messaging and analytics. In this scenario, the SDK performs following steps automatically:

  • Download the SDK configuration.
  • Monitor for regions defined in Lime Connect.
  • In case region is found, ask for an associated content rules.
  • Download the content rules and display notifications connected to it (on app background only).
  • If user opens the notification, render the content associated with the rule.
  • Automatically sends all analytic events to the Lime Connect.

Use the following code for this basic Lime Connect SDK integration:

- (BOOL)application:(UIApplication *)app didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Connect to your CMS data using the APP_KEY
    [[LimeConnect sharedInstance] startFetchingContextForApplicationKey:@"app_8cb31c49a46df1fea116a3e07f0b6a84"];

    // Handle notifications when your app is NOT running on background
    UILocalNotification *notif = [launchOptions objectForKey:UIApplicationLaunchOptionsLocalNotificationKey];
    [[LimeConnect sharedInstance] handleAppLaunch:notif];
    return YES;
}

- (void)application:(UIApplication *)app didReceiveLocalNotification:(UILocalNotification *)notif {
    // Handle notifications when your app is running on background
    [[LimeConnect sharedInstance] handleAppLaunch:notif];
}

Your application can now receive notifications from Lime Connect based on the content rules you created and display the content in your application.

API Reference

Advanced features of our mobile SDK, such as manual content rendering within the application, iBeacon ranging, notification throttling, or other features, are documented in our API reference.

http://assets.lime-company.eu/docs/ios/html/Classes/LimeConnect.html

Author

Lime - HighTech Solutions s.r.o.

License

Lime Connect SDK for iOS is available under GPLv3 license. See the LICENSE file for more info.