As of release 19.0, new Twixl apps can only use Google Firebase for sending out push notifications.
We chose to adopt Firebase on both iOS and Android because of the flexibility it offers for more advanced users that want to build marketing campaigns across platforms in a unified way.
Watch a video with step by step instructions
1. Get Started
- Go to https://console.firebase.google.com/
- Signin with a Google Account, preferably but not necessarily the same one you use for the Google Play Developer account.
2. Add a Project
- Click on Add Project. (You can also choose an existing project if you already created one before.)
- Choose a Project Name.
- Choose a Project ID or accept the proposed one.
3. Add an iOS app to the project
- In Project Settings, select the General tab.
- Add an iOS app.
- Fill in the Apple Bundle ID (that should correspond to the Bundle ID in the build settings, a reverse DNS name like
com.mycompany.myapp), and optionally specify an app nickname.
- Click Register to continue.
- Download the
GoogleService-Info.plistfile and save it. You'll need it later in your build setting on the platform.
4. Configure your app to use Apple Push Notifications service (APNs)
There are two ways to configure Firebase to connect to APNs: through the use of a private key that never expires, or through the use of certificates issued from Apple's Developer Portal. The approach of using a private key is the recommended way to configure Firebase for Twixl apps, because this key never expires.
- Follow the steps to create a p8 private key here. Write down the Key ID, the Team ID and download the key as a p8 file.
- Upload this p8 key to the Firebase console.
- Inside your project in the Firebase console, select the gear icon, select Project Settings, and then select the Cloud Messaging tab.
- At the bottom part of the page, select the iOS app.
- In APNs authentication key under Apple app configuration, click the Upload button.
- Select the saved key, and click Open.
- Add the Key ID and Team ID click the Upload button.
5. Download the Service Account Private Key
- Click on the Gear icon next to 'Project Overview' (you can skip this step if you already configured Firebase for your Android app and uploaded the key to the Twixl platform).
- Select Project Settings.
- Select the tab Cloud Messaging API.
- Enable 'Firebase Cloud Messaging API' if it's not enabled yet (for new projects it will be enabled by default).
- Select 'Manage service accounts'.
- Click on the service account
- Go to 'Keys', click 'Generate a new private key' and save the private key (a .json file). This key is the one that needs to be uploaded in the Push Notifications section on the platform.
6. Upload the JSON Private Key to the Twixl platform
- (You can also skip this if you already configured push for Android): Go to the detail view of your app on the Twixl platform, then select Push Notifications from the side menu (under 'Advanced').
- Upload the Service Account Private Key (JSON) generated in the previous step.
7. Configuring iOS push settings on the Twixl platform
- On the Twixl platform, go to your app, then navigate to the build settings section.
- In the build setting for your app, upload the Service Account File that you downloaded in step 2 (
8. Create a new build using the Twixl Publisher macOS app
- Create a build using the build setting you just updated. Install the build, via TestFlight (iOS), or directly on the device (Android).
- Start up the app, then exit it. Start up the app a second time. It should prompt for push notification permissions.
- You can register as a test device and send push notifications as documented here.
9. What about push notifications for an existing app ?
When you already have a Twixl app configured with Push Notifications, the existing configuration will continue to work through November 30, 2023.
If you need to change the settings of the app, the only way to do so is to convert the push notifications setup to use Firebase, based on the documentation above. Note that to continue to use push notifications after November 30th, it is mandatory to move to Firebase.
10. Testing Push Notifications on iOS
To test push notifications, first create a build and upload it to App Store Connect.
In the TestFlight tab there will be a list of all the builds uploaded. In the "Internal Testing" section it is possible to add a user that is a member of your App Store Connect team to test. Invite that member (possibly yourself) and they will receive an invitation e-mail from TestFlight to install the app. Use TestFlight on an iOS device to install the application.
On the first run, the push notifications are not activated yet, so force quit the app and run it a second time. This time permission will be asked and the device will be registered to receive push notifications.
It is possible to register as a test device. After that, on the Twixl platform, you can send the first push notification to this specific test device.
If this works properly, then it is safe to assume the app is ready to be distributed and all users will be able to receive push notifications.