Skip to main content

Push Notifications

Skillz has a built-in set of automatic push notifications that are sent based on in-game actions to drive player engagement and retention. Uploading a push notification certificate to Skillz doesn't prevent you from sending your own messages using normal methods, such as first & third-party push notification tools, etc.

In order to tell the difference between your game’s notifications and the notifications sent by Skillz, you can look in the dictionary of the notification payload. If it contains a property for SKZVersion, then you know it is a Skillz notification.

This article will walk you through on how to enable push notifications.

Setup Push Notifications​

1. Generate a Push Notification Certificate​

  1. Generate an APNs client TLS certificate for your app ID. Remember to download the certificate and add it to your Mac keychain.
  2. Regenerate the provisioning profile(s) for your app ID.
  3. Update your XCode project with the regenerated provisioning profile.
  4. Add the "Push Notifications" capability in your XCode project. It is found under Signing and Capabilities.

2. Export the Certificate in PKCS #12 (.p12) Format​

The certificate needs to be exported as a p12 file, as it contains the certificate, its chain, and private key in a single file.

  1. Launch Keychain Access.
  2. In the Category section, select My Certificates.
  3. Find the certificate you want to export and disclose its contents. You’ll see both a certificate and a private key.
  4. Select both the certificate and the key, and choose File > Export Items.
  5. From the File Format pop-up menu, choose a file format that your server accepts. Enter a filename in the Save As field, and click Save.

The certificate and key are saved to the location you specified as a text file in the Personal Information Exchange format (a file with a .p12 file extension).

3. Upload the Certificate to the Developer Console​

Next, upload the p12 file to the Developer Console. Select the "Push Notifications" section under the "Optimize" tab. Make sure you provide the password that was associated with the p12. Otherwise, Skillz will not be able to send push notifications to your game.

Upload Push Notifications

Test and Verify​

caution

You can only test Skillz push notifications on a build with your Skillz environment set to Production.

Allow Push Notifications​

Before you can test a push notification, you will need to accept push notifications in-app. Run your application on a device. Start Skillz, and follow through the First Time User Experience until you've completed a match.

Activation​

Push Notifications can take up to a day to activate after the Push Notification Certificates have been uploaded and verified on the Developer Console.

At that point you should see a Push pop-up like the following screenshot. Make sure you press "Give Access".

Send Test Notifications​

Test notifications can be sent from the page where you uploaded the push notifications certificate:

Verify Push Notifications

Enter the username of the user who you would like to receive the notification and click "Send Test". The user must be logged into the game on a device, and have push notifications enabled in order to receive your test push notification. It may take a few minutes for the user to receive the push notification, which will include a random 6-digit code. Please enter the code into the 2nd field on the screen and click "Verify" to finish the verification process.

If you are not receiving any push notifications, make sure you have enabled notifications for your app in your settings.

Go to Settings > Notifications, select your app and toggle on "Allow Notifications".

Troubleshooting​

If your game is not receiving notifications, make sure you've done the following:

  • If you just uploaded your .p12 file to the Developer Console, it can occasionally take some time for your new file to propagate through our system. Please try again in a few hours.
  • Enabled push notifications for your app ID in your Apple Developer account.
  • Generated a push notification certificate.
  • Added the certificate to your Keychain.
  • Regenerated your provisioning profile.
  • Updated your XCode project with the regenerated provisioning profile.
  • Added the "Push Notifications" capability in your XCode project.
  • Set the Skillz environment to Production in your app.
  • Provided the correct password for your .p12 to the Developer Console.
  • Gave your app permission to receive push notifications on the iOS device.

Please contact us, if you need further assistance.