Titanium Setup

How to install Airship Titanium module.

Resources

Requirements

iOS

  • Xcode 15.3+
  • minimum deployment target iOS 14+

Android

  • minSdkVersion 21+
  • compileSdkVersion 34+

Setup

Start by downloading the latest iOS and Android modules. Modify the tiapp.xml file to include and configure the Airship module.

Configure Airship

Example app.js
var Airship = require("ti.airship");

Airship.takeOff({
  development: {
    appKey: "Your Development App Key",
    appSecret: "Your Development App Secret"
  },
  production: {
    appKey: "Your Production App Key",
    appSecret: "Your Production App Secret"
  },
  site: "us", // use "eu" for EU sites.
  urlAllowList: ["*"], // allows all URLs
  android: {
      notificationConfig: {
          icon: "ic_notification",
          accentColor: "#ff0000"
      }
  }
});

tiapp.xml
<ti:app>
    ...

    <modules>
       ...

       <module platform="android">ti.airship</module>
       <module platform="iphone">ti.airship</module>
    </modules>


    <ios>
        <plist>
            <dict>
                ...
                <key>UIBackgroundModes</key>
                <array>
                    <string>remote-notification</string>
                </array>
            </dict>
        </plist>
    </ios>

</ti:app>

Android FCM

Android requires the google-services.json file to be copied into the app’s directory platform/android/google-services.json.

Implementation best practices

Make sure to set up logging. Internal logging can be valuable when troubleshooting issues that arise when testing.

Anytime you make any changes or updates to the SDK, test on a development device to ensure your integration was successful. Also make sure analytic information is still flowing to your Airship project before sending the app to production.