Push Certificates

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.

1. iOS

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.

  1. Double click the aps.cer to add to Keychain Access.
  2. Open Keychain Access and right click the added certificate. Export it as aps_production_cert.p12.

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
  1. Export the Private Key used for the certificate just the same and save it as aps_production_key.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
  1. From the command line, enter the following two commands (one at a time) to combine the certificate and private key files into one .pem:
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
  1. Now, upload the resulting apn_production.pem file to the Tapjoy dashboard under Settings > App Settings > Push Certificate.


2. Android

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:

  1. In the sidebar on the left, select the settings icon and then project settings.
  2. From the General tab you can obtain the Project ID (e.g. 136515230000). This value is required for calling: Tapjoy.setGcmSender("ID")
  3. In the Cloud Messaging tab you can obtain the Server Key and Sender ID. Add the Server Key to the "Android API Key" field on the Tapjoy dashboard and the Sender ID to "Android Sender ID". These fields can be found under Settings > App Setting > Push Certificate