Configure Mobile Channels and Push Providers in the Airship Dashboard
iOS channel configuration
To configure an iOS channels, you must configure Apple Push Notification Service (APNs). To do this, you can either use token or certificate auth. It is recommended to use token auth to simplify setup and to avoid having to renew your certificate every year.
Consider the following as they relate to authentication setup and app development:
Default and fallback behavior — Airship defaults to token-based authentication for APNs but will fall back on certificates if token authentication is not configured. For existing projects, it is recommended that you leave your certificate in place when migrating to token-based authentication so that push can be quickly restored if there are any issues during that process. Also, if you remove your certificate before setting up token-based authentication, you may have a period when you cannot send messages.
After confirming token-based authentication is working, you can let the certificate expire, or revoke the certificate from the Apple Developer Member Center.
Production vs. Development Projects — When you create or edit an Airship project (and thus its application record on our server), you must select whether your app system is Test (development for sending test messages) or Live (production for sending messages to customers).
Apple treats the production and development servers separately, so a device token for a test sandbox will not work on a production sandbox. Because of this, we suggest creating both Live and Test projects in the Airship dashboard so you can continue to build and develop your application without interrupting your users. Configure the development credentials for the test project, and production credentials for live project. Then switch between the two credentials using the inProduction flag when configuring the Airship SDK.
Warning
Do not a) submit to the App Store or b) test notifications on an
ad hoc build while your app’s code is pointing to an Airship app
key that is set as Test. Test apps use different tokens that, when included in a push to a Live app, will fail and in many cases cause all other pushes to fail.
Always create a Live Airship project first, and
make sure your application code is pointing to the live project’s app
key. For more tips on what to check before you release your app, see the
iOS Production Launch Checklist).
Token auth (Recommended)
First, get your identifiers for your iOS app ID and register and download a new key. You will use them when configuring the iOS channel in Airship.
Go to Account, then Membership details, then note your Team ID.
Go to Program Resources, then Certificates, IDs & Profiles, then Identifiers.
If you already registered an iOS App ID:
Select its name in the list of App IDs.
Note the Bundle ID for the app.
Enable Push Notifications.Enabling push notifications for an iOS app ID
If Push Notifications was already enabled, select All Identifiers at the top of the page to go back. Otherwise, select Save.
Go to step 6 below.
If you have not already registered an iOS App ID, add one now:
Select the plus icon (), then select App IDs.Adding an iOS app identifier
Select Continue.
Fill out the Register an App ID form and enable Push Notifications. Also note the Bundle ID you enter.Registering an app ID
Select Continue, then Register.
Continue to step 6 below.
Register a new key:
In the sidebar, select Keys.
Select the plus icon ().
Enter a unique key name.
Enable Apple Push Notifications service (APNs).Registering a new key
Select Continue, then Register.
Note the Key ID, then select Download to save the key in .p8 format.Getting your key ID and downloading the key
Important
Be sure to save your key in a secure location if you intend to use it across multiple apps or Airship
projects. Apple only allows two registered APNs keys per team, so reaching this limit would require you
to revoke one of your existing keys before creating a new one, which in turn would require an update for
any apps previously using the revoked key. Airship will not make your key available for download or
sharing across projects once it has been uploaded.
Now you can configure the iOS channel for the project in Airship:
Go to Settings.
Under Channels, select Mobile Apps or Mobile App & Web.
Go to Account, then Program Resources, then Certificates, IDs & Profiles, then Identifiers.
If you already registered an iOS App ID, select its name in the list of App IDs, then go to step 5 below.
If you have not already registered an iOS App ID, add one now:
Select the plus icon (), then select App IDs.Adding an iOS app identifier
Select Continue.
Fill out the Register an App ID form and enable Push Notifications.Registering an app ID
Select Continue, then Register.
Select your app’s name in the list of App IDs, then continue to step 5 below.
Under Capabilities, enable Push Notifications, then select Configure. The button is labeled Edit if it was previously configured.enabling Push Notifications for an App ID
Note
If the Configure/Edit button is not available, you may not be the
team agent or an admin. The person who originally created the developer
account is your team agent, and they will have to carry out the remaining
steps in this section.
Select Create Certificate:
You should now see the Create a New Certificate section, where you will generate an Apple Push Notification service SSL (Sandbox & Production) certificate compatible with both the
Production and Development environments:
Select Continue after uploading your certificate signing request.
You can now use the newly-created Certificate Signing request to generate
the APNs Push SSL certificate. The next step requires the Download
button to be active. You may need to reload the page if it is not yet active.
Select Download and save the file for use in the next step.
Open the certificate you downloaded in the previous step.
It should open in the Keychain Access app and be
listed in My Certificates.
Select the certificate in the list, then from the File menu, select
Export Items….
Note
Be sure to select
My Certificates under the Category menu on the lower left-hand side.
If My Certificates is not highlighted, you will not be able to export
the certificate as a .p12 file.
Save the file in the Personal Information Exchange (.p12) format.You will be prompted to create a certificate password. Use this password in the Airship dashboard.
Now you can configure the iOS channel for the project in Airship:
Go to Settings.
Under Channels, select Mobile Apps or Mobile App & Web.
Under Platforms, select iOS.
For Certificate-based authentication, select Edit.
Enter the certificate password and upload the .p12 file.
Select Save.
Android channel configuration
To configure Android channels, you must configure either Firebase Cloud Messaging (FCM) and/or Huawei Mobile Services (HMS). If both push providers are configured, the Airship SDK prioritizes FCM as the push provider if the app and the SDK are set up for both.
FCM rate limit
The Firebase Cloud Messaging API has a default rate limit of 600,000 requests per minute. If your project reaches that limit, Airship will retry after one minute. You may want to request a rate limit increase if you send to large volume audiences when sending time-sensitive messaging such as breaking news.
Firebase projects use Google’s FCM HTTP v1 API, which uses short-lived access tokens that follow the OAuth2 security model. In the event of tokens becoming public, they can only be used for about an hour before they expire.
Important
In July 2024, Google replaced the Cloud Messaging API with the FCM HTTP v1 API. This change affected sending Android push notifications. We updated our services to use the new API, but your project cannot start using it until authenticated.
If your Airship project has not yet moved to token-based authentication, complete the setup steps that follow this note. You will enable the Firebase Cloud Messaging API (V1) for your Firebase project, generate a private key and download the file, and upload the file in your Airship project settings.
Your Airship project will immediately switch to using the new API to send Android push notifications. You do not need to update your SDK and/or release a new version of my app. This is a server-side change only.
Either create a new project or select an existing project that you want to configure with Airship.
In the sidebar, select the gear icon (), then Project settings:Selecting Firebase Project settings
Select the Cloud Messaging tab.
For Firebase Cloud Messaging API (V1), select the three dots icon (), then Manage API in Google Cloud Console, which will open in a new browser window or tab:Managing the API
Select Enable:Enabling the Firebase Cloud Messaging API
Close the Google Cloud Console window or tab.
If you are setting up token authentication after previously using server key auth, you must give your Firebase service account the cloudmessaging.messages.create permission to send notifications and data messages through the FCM HTTP API and Admin SDK. You can create and assign a custom role for the single permission or you can assign the Firebase Cloud Messaging API Admin role, which includes the permission and other permissions.
For additional information, see Google references:
In the sidebar, select the gear icon (), then Project settings.
Select the Service accounts tab.
Under Firebase Admin SDK, select Generate new private key, then Generate key. The key will download as .json file with a name like project--4173162SAMPLE949879-firebase-adminsdk-0ddvl-1d0bc7bacb.json. Make sure to store this file in a secure location.
Now you can configure the Android channel for your project in Airship:
Go to Settings.
Under Channels, select Mobile Apps or Mobile App & Web.
Under Platforms, select Android.
For Application ID, select Edit, enter your application ID, then select Save.
For Firebase Cloud Messaging (FCM) Token-based authentication, select Edit and upload your Firebase private key file, then select Save.
HMS
First you need to configure your app information in AppGallery Connect, then you can enter your HMS client ID and secret in Airship.
Select My projects, then select the project that contains the app you configured with Airship, then select the Airship app.
Under App information, copy the values for Client ID and Client secret.Retrieving the client ID and secret from AppGallery Connect
These steps are also provided in Viewing Basic App Information in Configuring App Information in AppGallery Connect.
Now you can configure the Android channel for the project in Airship:
Go to Settings.
Under Channels, select Mobile Apps or Mobile App & Web.
Under Platforms, select Android.
Under Huawei Mobile Services (HMS), enter your Huawei client ID and client secret in the Huawei app ID and Huawei app secret fields.
Select Add Android.
Fire OS channel configuration
To configure Fire OS channels, you must configure Amazon Device Messaging (ADM).
Note
While you will not need in-depth knowledge of the ADM platform
in order to use ADM for push notifications, we recommend that you
review Amazon’s Overview of Amazon Device Messaging before continuing.