To use the library in an iOS application, a few steps must be performed.

Alternative method when using CocoaPods – If you are using CocoaPodssign up and just add the following line to your Podfile to integrate the library into your IOS application. Continue at Step 5 afterwards.

pod 'PlotPlugin'

Step 1: Get The Library

Once you log in to our dashboard, download the library under the “Developer Tools” tab.

Developer tools
Step 2: Implement libPlot-.a

Extract the zip file and copy the libPlot-<version>.a file to your project.

Step 3: Implement Plot.h

Copy Plot.h to your project’s source files

Step 4: Add libraries

In the target settings add the following libraries in “Link Binary with libraries” under “Build phases”

  • libPlot-….a
  • libsqlite3.tbd
  • CoreLocation.framework
  • MessageUI.framework

Use libsqlite3.dylib for XCode 6 and older

Step 5: Add usage description

Add in “Custom iOS Target Properties” under “Info” the key “NSLocationAlwaysUsageDescription“.

The value must be a message for the user describing why your app uses the location of the device. For example: “Your location is used to instantly inform you when you are near a location that is interesting to you.”

This text is shown when permission to use the location of the device is requested. Note that for the app to be accepted in the App Store, the description why the app needs location services must be clear to the end user.

Step 6: Add PlotDelegate

Add PlotDelegate to the implemented protocols of your AppDelegate in the header (.h) file.

@interface AppDelegate : UIResponder &lt;UIApplicationDelegate, PlotDelegate&gt;
Step 7: Implement Appdelegate

In the implementation file (.m) of your AppDelegate call [Plot initializeWithLaunchOptions:launchOptions delegate:self] in application:didFinishLaunchingWithOptions:

Plot is enabled by default on the first run.

#import "Plot.h"
@implementation AppDelegate
-(BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  //initializes the Plot library:
  [Plot initializeWithLaunchOptions:launchOptions delegate:self];
  return YES;
Step 8: Add configuration file

You can configure Plot through the configuration file. You can find an example config file and your public token on the Developer page on our dashboard.

Add this file as plotconfig.json in the root folder.

  "publicToken": "REPLACE_ME",
  "enableOnFirstRun": true
Step 9: Almost done!

Add [Plot handleNotification:notification] to application:didReceiveLocalNotification: in the implementation file (.m) of your AppDelegate.

-(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
  //Pass the notification to the Plot library to pre process the notification.
  //Don't handle the notifications yourself in this method, because this method isn't always called when a notification is opened.
  [Plot handleNotification:notification];