Skip to content



OpenBack Titanium Mobile Module

To install OpenBack for your Titanium app, download the latest release binaries from Github then unzip in your application folder.

Adding the module

In your tiapp.xml, add the OpenBack module for android and/or iOS

    <module platform="iphone">com.openback</module>
    <module platform="android">com.openback</module>

Configure OpenBack

iOS Specific Settings

Edit the plist section of your tiapp.xml - most settings are optional. For a full list of available plist settings, check iOS PList documentation.



Note: There seems to be a bug with the appcelerator build tools when settting an integer value to 0 like <integer>0</integer>, the tool transforms it into <integer/> which is invalid with xcode.

Android Specific Settings

Add a file named openback.json to the app/assets/android folder. After the build, it should appear in the assets/Resources folder in your build folder.

Refer to the config file for details.


Firebase is also required for some features (instant message update, regular push messages). We recommend using this repo. Once you have Firebase setup, make sure to add the OpenBack services to handle messages in tiapp.xml:

<ti:app xmlns:ti="">
  <android xmlns:android="">
    <service android:name="com.openback.OpenBackFcmInstanceIdService">
            <action android:name="" />
    <service android:name="com.openback.OpenBackFcmMessagingService">
            <action android:name="" />


Include this line in your application source file(s) to to load the module.

var OpenBack = require('com.openback');


If your application needs COPPA to be enabled, set the COPPA compliant status with this function. If COPPA is enabled, messages will not run unless compliant is set to true.

coppaCompliant(bool compliant)


When your user requests that all the data should be erased, set this value to true. It will inform the OpenBack server to remove all logs for the current user. All future logs will be erased after processing. If you wish to be fully GDPR complient, you also need to enable GDPR in your application settings on the OpenBack Dashboard.


gdprForgetUser(bool forgetUser)


Returns the current OpenBack SDK version.

string version()
var version = OpenBack.version();

Logging a Goal

At any point, you can log a goal that is associated with a message. Make sure to use the Goal code, not the Goal name.

logGoal(string goal, int step, double value)
OpenBack.logGoal("Test", 1, 12.3);

User Info & Custom Values


Set a custom trigger value. Value can be string, integer or double.
For the trigger index, use CUSTOM_TRIGGER_1 to CUSTOM_TRIGGER_10.

setCustomTrigger(int trigger, id value)
OpenBack.setCustomTrigger(OpenBack.CUSTOM_TRIGGER_1, "customString");
OpenBack.setCustomTrigger(OpenBack.CUSTOM_TRIGGER_2, 123);
OpenBack.setCustomTrigger(OpenBack.CUSTOM_TRIGGER_3, 2.56);


The application can pass some extra user information using a simple dictionary object by setting the following fields:

Name Type Description
addressLine1 string Address line 1
addressLine2 string Address line 2
advertisingId string Advertising identifier set by the application
age string Age
city string City
country string Country
countryCode string ISO-2 country code
dateOfBirth string Date of birth YYYY-MM-DD
emailAddress string Email Address
firstName string First name
gender string Gender
optInUpdates string Opting in for message updates "true"/"false"
phoneNumber string Phone Number (international format)
postCode string Postal code
profession string Profession
state string State
surname string Surname
title string Title
identity1 string Custom user identifier 1
identity2 string Custom user identifier 2
identity3 string Custom user identifier 3
identity4 string Custom user identifier 4
identity5 string Custom user identifier 5

Note on Custom User Identifiers:
Identity is for use with the OpenBack API. If you are not an OpenBack API client, don't use them. Identities are bound to the current OpenBack user, so changing any one of them will reset user and campaign usage. A usage example: when your application has users that can login and logout, you can set one of the Identity to a token used in your system to identify that user. Later on, using the OpenBack API, you can fetch details from that user.

    'firstName': 'John',
    'surname': 'Doe',
    'emailAddress': ''

Using Hyperloop

It is also possible to use Hyperloop to call the SDK directly.

Pros: Use Cocoapods and maven to stay up-to-date with SDKs.
Cons: The native API differs enough that you will need a lot of if ANDROID cases.

Enable Hyperloop

<module platform="android">hyperloop</module>
<module platform="iphone">hyperloop</module>


Add a Podfile

install! 'cocoapods',
         :integrate_targets => false

platform :ios, '8.0'
target 'OpenBackSample' do
    pod 'OpenBack'

Please refer to the iOS API for more info.


Add a build.gradle

apply plugin: 'java'

repositories {
    maven { url '' }

dependencies {
    implementation "com.openback:OpenBack:2.+"

task getDeps(type: Copy) {
    from sourceSets.main.runtimeClasspath
    exclude 'support-*' // The support libraries are packaged with Titanium already
    into 'platform/android/' // Use "app/platform/android" for Alloy

Please refer to the android API for more info.