To deploy Push Notifications or FCM (Firebase Cloud Messaging), you need to upload a certificate or API Key to the Tapjoy dashboard. Separate configurations are needed for iOS and Android. This document explains how to create and upload the necessary certificate.
To enable Push in your application and generate your certificate file, please follow the instructions below. For further details visit Apple’s developer site here.
Go to Apple Developer Site > Certificates, Identifiers & Profiles > iOS Apps > Identifiers > App IDs and create an app id with push enabled. After creating your app id, open it and choose ‘configure’ next to ‘push notifications’.
First you will need to generate a certificate and upload it:
Then you can download the Production SSL Certificate file for Apple Push Notification service.
In order to upload the downloaded aps.cer file to Tapjoy, you must first convert it to a .pem file.
From the command line, enter the following command to convert the .p12 file to .pem:
openssl pkcs12 -clcerts -nokeys -out aps_production_cert.pem -in aps_production_cert.p12
From the command line, enter the following command to convert the .p12 file to .pem:
openssl pkcs12 -nocerts -nodes -out aps_production_key.pem -in aps_production_key.p12
openssl rsa -in aps_production_key.pem -out aps_production_key_noenc.pem
cat aps_production_cert.pem aps_production_key_noenc.pem > apn_production.pem
To use FCM, you need to obtain a server key from the Firebase Console. If you haven’t configured FCM in your project, refer to the FCM docs.
To enable the FCM service:
Tapjoy.setGcmSender("ID")