To install the Plot plugin into your Appcelerator Titanium app only a couple of small steps have to be performed. Note that this module was developed for Titanium 6.2.2.GA or newer. This plugin supports both iOS and Android.

Step 1: Download The Zip

Log into our dashboard, go to the “Developer Tools” tab, by clicking on “Download Plot Projects SDK”. There you find the latest version of Appcelerator module. The plugin can be obtained as a .zip file found under “Appcelerator Titanium Module” on that page. Don’t have a Plot Projects account? Sign up for free!

Developer tools
Step 2: Install in Appcelerator Studio

After you downloaded the .zip for the plugin, you install it in Appcelerator Studio by following the following steps:

  1. Open Appcelerator Studio.
  2. In the Help menu, select Install Mobile Module.
  3. Insert the .zip file obtained in the previous step.
Step 3: Add Configuration File

Before using the plugin, you add a configuration file in theassets folder and name the file plotconfig.json. The snippet on the right shows an example of the file. You look up your public token in the dashboard.

{
    "publicToken": "REPLACE_ME",
    "enableOnFirstRun": true
}
Step 4: Set permission rationale

Note that if your app also targets iOS, then it is required to specify why your app requires location services. You do that in your plist. Add the following lines to tiApp.xml at the ios/plist/dict element:

<key>NSLocationAlwaysUsageDescription</key>
<string>The app uses your location in order to inform you about special offers in nearby stores.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>The app uses your location in order to filter information shown based on what's near you.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>The app uses your location in order to inform you about special offers in nearby stores and customize its content based on what's near.</string>
Step 5: Almost done!

Add the snippet below to one of your scripts used to initialize your application. You usually do this in app.js or alloy.js:

var plot = require('com.plotprojects.ti');
plot.initPlot({ notificationFilterEnabled: false });

You are now ready to receive your first notification. For more details, look at the extensive documentation or our Github page.

Sign Up To Download The Plugin!