Skillz has the ability to send push notifications to players in order to inform them when their tournaments have finished, their friends have accepted invitations to join Skillz, or other important events happen. These notifications are a Skillz feature that you must take extra steps in order to enable.
In order to tell the difference between your game’s notifications and Skillz notifications, 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 provisioning profiles.
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 generateto 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 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 file with handy when uploading.
Step 4: Test and verify
Note: You can only test Skillz push notifications on production.
To send a test notification, simply enter the desired username and click Send Test. The username must be logged into the game on an iOS device and have enabled push notifications. Check your device to see if you've received the notification - this can take a few minutes. The push notification will include a random 6-digit code, and that code will need to be entered to finish the verification process. Once received, simply enter the 6-digit code and click Verify.
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 from 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