Configuring Push in iOS
APNS Certificate
First, you will have to create an APNS certificate and upload to the dashboard to be able to send push notifications in iOS. Follow the steps below to do that :
- Create an APNS certificate
- Convert the resultant certificate to .pem format
- Upload .pem file to MoEngage Dashboard
*Follow the links on each step to complete it.
Push Registration
After this you will have to register for push notification in the App by using RegisterForPush method of the plugin as shown below:
using MoEngage;
MoEngageClient.RegisterForPush();
App Target Settings
MoEngage plugin takes care of setting up the project while building it for the first time. But verify the Capability section has Push Notifications enabled along with AppGroups and Background Mode Settings as shown below:
| info |
Note MoEngage plugin creates an app group for the app with format: |
Notification Extensions
| info |
Note This step is only required on first-time integration OR whenever you |
MoEngagePlugin adds MoENotificationServiceExtension and MoEPushTemplateExtension target for supporting Rich Push and Push delivery tracking. Verify the Capability section has Push Notifications enabled along with AppGroups as shown below:
Add MORichNotification framework
In MoENotificationServiceExtension and MoEPushTemplateExtension target, add MORichNotification framework to Frameworks and Libraries section from Pods folder as shown below:
| warning |
Warning
|