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.
Step 1: Enable push notifications in your game
Start by going to Apple’s Developer Portal and logging in.
On the right side of the screen, under iOS Developer Program, choose the Certificates, Identifiers, and Profiles button.
On the next page, choose Identifiers. This brings you to all of your App ID’s. Edit the App ID for your game and enable push notifications.
Follow Apple’s steps to create a production APNS certificate for your game.
Important: when making changes to your App ID settings, you need to update all your application’s ProvisioningProfiles.
For more detailed information about Provisioning Profile, refer to the Apple local and push notification programming guide.
After adding a certificate, the affected profiles in the Provisioning Profiles section will be marked as invalid. Hit edit and generate to recreate the Provisioning Profile.
You will also need to update your XCode project settings with the newly-regenerated Provisioning Profile. Later, when you create the binary for distribution, you will need to ensure that it uses the correct profile.
Also ensure that your Provisioning Profiles are not signed with a wildcard app ID. For example, “com.skillz.*” would not receive push notifications. You must use a specific app ID, like “com.skillz.diamondStrike”.
Lastly, Make sure that you have turned on Push Notifications inside the Capabilities tab of your target app.
Step 2: Create a p12 out of your certificate
Once you have your APNS certificate created you will need to package the certificate and the corresponding private key in a p12 file. For security reasons, we recommend you do not use this private key for anything besides creating the initial CSR file that was used to create the certificate.
If you are creating a p12 on a Windows machine, follow this tutorial from Adobe instead.
To create a p12 file:
- Open Keychain Access on your computer.
- Import the certificate you created in the previous step by selecting File -> Import Items.
- Select the Certificates category.
- Select your game’s APNS certificate:
- Select File -> Export Items.
- Save as a Personal Information Exchange (.p12) file.
- You will be prompted to create a password. Make note of this password, as you will need it when you upload to Skillz.
- Save the p12 file in a secure place so that you can retrieve it later.
Step 3: Upload the p12 to our website
The final step to enable Skillz notifications in your game is to upload the newly-created p12 file to Skillz. Go to the Push Notifications section of your game in the Skillz Developer Portal and upload your file to our servers. Be sure to have the password you encrypted the p12 file with available when uploading.
To enable push notifications before launching your game, you can configure them on the push notifications screen shown below.
To change your push notification settings in a game that is already live, go to your Game Dashboard and click the edit button next to the game you wish to update. Then click Push Notification on the left hand sidebar to access the screen you see below.
Step 4: Test and verify
Note: You can only test Skillz push notifications with your Skillz environment set to production.
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 hit "Give Access".
Push notifications can be tested on the verify configurations screen for games that are not yet launched.
For live games, this can be found at the bottom of the push notifications screen as outlined in Step 3.
To send a test notification, 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 enabled push notifications in their settings 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.
The image below shows an example of a push notification containing the 6-digit verification code.
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 you have any questions or require assistance, please reach out to firstname.lastname@example.org