Push Notifications

Games may use their own server to send Push Notifications to clients. If a game does not have a server DeltaDNA may be leveraged to provide push notifications. There may also be cases where though a game has a server, you prefer to use DeltaDNA to schedule notifications.

iOS Setup

There is not a whole lot to do for iOS to support PNs. We simply need to generate the certificate and ensure builds have the proper entitlement.

  1. Work with the producer to generate an APNS Certificate.
  2. Be sure the builds you deliver are provisioned with the aps-environment: production entitlement. To do this, you’ll need to enable PNs for the App Id of your shadow project (see Configuring Push Notifications).
  3. Send push notifications:
    • (Option A) If using your own server, your producer will provide you with the APNS Certificate generated in step 1 and you will handle configuring and sending PNs from your server.
    • (Option B) If using DeltaDNA, export the APNS Certificate and deliver it and the password to the producer. The producer will use DeltaDNA to configure, test, and send notifications.

NOTE: By default DeltaDNA is configured to handle Push Notifications and the SDK auto collects the device token. If you use your own implementation, you may need to disable this. Include the following in your API settings to do so:

NSDictionary* apiSettings = @{ ...
            KONGREGATE_SWRVE_PUSH_ENABLED: @NO,
            KONGREGATE_SWRVE_AUTO_COLLECT_DEVICE_TOKEN: @NO}
[KongregateAPI initialize:gameId apiKey:apiKey withSettings:apiSettings];

Android

If DeltaDNA is used on Android, a few additional entries will need to be added to the Android manifest and your Sender ID will need to be included with the Kongregate API initiailization. If you have your own server, you only need the producer to provide you with the Sender ID, and the rest is up to you.

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<resources>
  <string name="ddna_application_id">"YourFirebaseApplicationID"</string>
  <string name="ddna_sender_id">"YourFirebaseSenderID"</string>
</resources>

Testing

To verify everything is working properly, use the DeltaDNA Dashboard to send some test push notifications to yourself.