Please note:
To unlock this capability, you will need to have added Mobile Push Notifications to your Optimove package. If you can’t see this feature in your Optimove instance, contact your CSM to find out more.
Configure Gateways
In order to send messages to users of your app, you must configure one or more messaging gateways. For mobile push notifications, this will likely involve configuring the Apple Push Notification Service (APNS) and/or Firebase Cloud Messaging (FCM), uploading your push certificates to Optimove, and then integrating the SDK.
Please note:
- The OptiMobile SDK also supports other channels and capabilities, including In-App Messaging, Location Targeting, Deferred Deep Linking and more.
- For web push notifications, you will need to integrate the Web SDK.
- Learn more about our SDKs here.
To begin configuring gateways, navigate to the Settings area of the site, scroll to OptiMobile, and select Mobile Push Config.
You will now see the options to select between iOS, FCM, and HCM.
Click the cog icon next to the platform you would like to configure to open the dialog where you can enter the required information to send push notifications to iOS devices via APNS, Android devices via FCM, or Huawei devices via HCM.
APNs Configuration
To send push notifications to iOS devices with Optimove, you have to complete the following steps with either Key or Certificate based credentials:
- Set up APNs credentials in your Apple Developer account
- Configure Push
Configure APNs
In order to generate a P8 key for Apple services follow the steps below:
- Access your account at https://developer.apple.com/ and select "Certificates, Identifiers & Profiles", then select "Keys" on the left.
- Select "Create a Key" and on the form "Register a New Key" enter a meaningful name such as "APNS Access Key" and check the "Enable" checkbox for "Apple Push Notifications service (APNs)", click "Continue".
- On the confirmation screen double-check the APNs enablement is set then click "Register".
- On the final screen take note of your KeyID and download the key.
You now have all the details to configure your App, so navigate to the Settings area of the site, scroll to OptiMobile, and select Mobile Push Config. Click the cog next to the Apple icon. Select APNs P8 and select your file, enter your other details and click "Configure".
Please note:
You can only download the key once, if lost the key must be revoked and re-created. Also, downloading the key will save a .p8 file with the access credentials.
FCM Configuration
In order to enable push notifications for Android with Optimove, you'll need to set up an FCM project and configure push for your app.
It is the Google Service Account private key JSON file that needs to be uploaded to Optimove, not the Google Services JSON file you include in your app project. The Google Service Account JSON file can be generated from the "Service Accounts" section of the Firebase Developer console.
Once you have generated the JSON file, navigate to the Settings area of the site, scroll to OptiMobile, and select Mobile Push Config. Click the cog next to the Android icon. Select your Google Service Account JSON file and click "Configure".
HCM Configuration
The latest Huawei handsets such as the P40 family of phones do not use FCM for push notifications and instead use Huawei Cloud Messaging (HCM). If you want to message all your Android users, including those using Huawei phones, then in addition to FCM you also need to configure HCM.
Configure a project on the Huawei Developer Console, and enable the Push feature by following the Push Kit developer guide step 1. Note that your app needs a valid signing configuration for both debug and release builds. The SHA-256 fingerprint of your signing key must match the Huawei app configuration before continuing.
Once you have created the app, configure the HCM gateway in Optimove. Navigate to the Settings area of the site, scroll to OptiMobile, and select Mobile Push Config. Click the cog next to the Huawei icon. Add your App ID and App Secret and click "Configure".
Download and Integrate an SDK
You can now download the appropriate SDK(s) for your mobile app by following the integration guide for that SDK to initialize the Optimove client in your app project. Please find the integration guides for all of our OptiMobile SDKs here. Please note that you will require your Optimove and Mobile credentials.
Please note:
If you are migrating from another third-party vendor, you will need to swap out their SDK for our SDK. You will need to do this to obtain the device token for each customer. However, this will not cause the customer to be asked again to give permission for push notifications. If a customer has already given permission for push notifications, the Optimove SDK will automatically get the device token without asking the user again.
Checking Installs of Your App
When you run your app on a simulator or install your app on a device, you can check that the SDK has been initialized correctly by selecting the app and clicking the Installs tab, found under OptiMobile in the Settings area, to see the ten most recent installs of your app. Click on an install, click the Push tab, and click Send Test Push.
Understanding the Test Push Feature
Purpose: To Verify Technical Connectivity
The "Send Test Push" button is a diagnostic tool designed for one primary reason: to confirm that a valid push token has been received from the device and that the connection between our platform and the Apple (APNs) or Google (FCM) push service is working correctly for that specific install.
If the device receives the notification, you have successfully confirmed your SDK integration for push.
Limitations: No Customer Data or Personalization
This test push is sent directly to the device install without any link to a customer profile. Because of this, it cannot access any customer attributes.
- What to Expect: Any personalization placeholders in your push template (like names, loyalty points, etc.) will not be filled. You will see the raw placeholder text (e.g., Hello {{customer.firstName}}) or a blank space where the attribute would be.
- How to Test Personalization: To test a push notification with real, personalized content, you should create a segment containing your own test profile and send a live, targeted campaign to that segment.
Please note:
If you do not receive the push notification, check the Error Log for any errors sending the push notification to the native push gateways. If you continue to experience problems, please contact your CSM for support in troubleshooting the configuration.
Reviewing Your Configuration
To review your messaging gateway configuration, Navigate to the Settings area of the site, scroll to OptiMobile, and select Mobile Push Config. This will show how many installs are subscribed to receive push notifications and how many users have opted in to receive in-app messages, broken down by platform.
Viewing the Error Log
The Error Log, found under OptiMobile in the Settings area, will show any errors encountered when sending push notifications to the native push gateways such as APNS or FCM. You can see the gateway where the error occurred, the status code, the error message itself, and when it happened. This can help debug any problems.
Please note:
If you cannot see the Error Log, you may need to update to the latest APNS/FCM APIs.
Common Errors
Here are some common errors along with details of how to resolve them. However, if you continue to experience any problems, please don't hesitate to contact support who is standing by to help.
Device Token Not For Topic
The Device Token Not For Topic error from APNS usually means that the bundle id in the APNS certificate uploaded to Optimove is different from the bundle id in the push token received from the install that the push that was to be sent to.
Please check that your APNS certificate is a Sandbox & Production certificate and that the bundle id matches that of your XCode project.
Firebase Cloud Messaging API has not been used in the project
This error can sometimes be received from FCM depending on how old your Firebase project is and wherein the Google developer console you enabled FCM.
To learn more about why this error has occurred, please go to your Google developer console and enable the Firebase Cloud Messaging API.