Appcelerator integration guide

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? Schedule a demo and we'll invite you to your account.

Appcelerator Integration

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 the assets 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:

<string>The app uses your location in order to inform you about special offers in nearby stores.</string>
<string>The app uses your location in order to filter information shown based on what's near you.</string>
<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 our Github page.

Need more help during testing, look at the testing section of the documentation.