Skillz has a built-in set of automatic Push Notifications that are sent based on your in-game actions to drive player engagement and retention. Remember, 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 for your iOS based game.
Enable Push Notifications
Follow the steps below to enable push notifications and generate a push notification certificate.
- Generate an APNs client TLS certificate for your app ID. Remember to download the certificate and add it to your Keychain.
- Regenerate the provisioning profile(s) for your app ID.
- Update your XCode project with the regenerated provisioning profile.
- Add the "Push Notifications" capability in your XCode project. It's under "Signing and Capabilities".
Upload the Certificate to the Developer Console
Now, you'll need to upload your certificate to the Developer Console. However, the certificate needs to be exported as a p12 file, as it contains the certificate, its chain, and private key in a single file.
To export your certificate from a Mac, follow these instructions. Alternatively, follow this tutorial to export the certificate from Windows. You'll be asked to provide a password to access the p12 file - remember it.
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.
Test and Verify
You can only test Skillz push notifications 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. 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:
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 an iOS 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 in your app by going to your iOS device's
Settings > Notifications, selecting your app and toggling on "Allow Notifications".
If your game is not receiving notifications, make sure you've done the following:
- 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.