iOS Push Configuration

Push Configuration

Following are the two ways to configure Push Notification

APNS Authentication Key:

To send push notifications to iOS users, it is required to generate the APNs Auth Key file for your application and upload it to the MoEngage dashboard. Refer the link to generate Auth key.

APNS Certificate:

First you will have to create an APNS certificate and upload in the dashboard to be able to send push notifications in iOS. Follow the steps below to do that :

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 :

cf64cc0-ed7cfbb-d14e7f7-Screen_Shot_2016-09-19_at_17.21.03.png

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 :

41b2d0c-fe41b0d-e852f43-Screen_Shot_2016-09-19_at_17.21.21.png

Push Registration:

After this you will have to register for push notification by using registerForPush method of the plugin as shown below :

JavaScript
//This is only for iOS
import ReactMoE from 'react-native-moengage'
ReactMoE.registerForPush();
warning

Warning

Plugin gets all the remote notification-related callbacks, therefore you won't receive any of them in your AppDelegate. Therefore, you will have to add observers for the notifications provided by plugin instead.

Provisional Push Registration:

info

Information

  • This feature is supported from version 11.1.0 of the plugin.

To register for provisional push notification, call registerForProvisionalPush Api of the plugin as shown below 

JavaScript
import ReactMoE from 'react-native-moengage'

// This API is only for iOS
ReactMoE.registerForProvisionalPush();

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:

Previous

Next

Was this article helpful?
0 out of 1 found this helpful

How can we improve this article?