Skip to main content

Configuring Push Notifications in iOS

APNS Certificate

To send push notifications in iOS, create an APNS certificate and upload it to the dashboard. Complete the following steps:

Adding Push Entitlement to your Project

Once the APNS Certificate is uploaded, enable Push Entitlement in the Xcode project. For that select your app target, then go to Capabilities. Here enable the Push Notifications capability for your app as shown below : I OS Push Configuration1 1

Uninstall Tracking

We make use of silent pushes to track uninstalls. For tracking uninstalls of all the users, enable Remote Notification background mode in-app capabilities for the same as shown below : I OS Push Configuration2 1

Push Registration

After this you will have to register for push notification by using registerForPushNotification method of the plugin as shown below :
var moe = new MoECordova.init();
moe.registerForPushNotification();
Push token generated is received from onPushTokenGenerated callback
moe.on('onPushTokenGenerated', function (payloadInfo) {
    console.log('pushToken generated' + JSON.stringify(payloadInfo)); 
    });

Rich Push and Templates Support:

Please refer to the Native iOS SDK docs for supporting Rich Push(images/videos/audio in the notification) and Templates in the app: