Titanium Setup

How to install Airship Titanium module.

Resources

Requirements

iOS

  • Xcode 14.3+
  • minimum deployment target iOS 14+

Android

  • minSdkVersion 21+
  • compileSdkVersion 33+

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.