> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# iOS Push Configuration 

> Configure iOS push notifications in your Cordova app including APNS certificates and push registration.

# 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:

* [Create an APNS certificate](/developer-guide/ios-sdk/push/basic/apns-certificate-pem-file-legacy)
* [Convert the resultant certificate to .pem format](/developer-guide/ios-sdk/push/basic/apns-certificate-pem-file-legacy)
* [Upload .pem file to MoEngage Dashboard](/developer-guide/ios-sdk/push/basic/apns-certificate-pem-file-legacy)

## 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 :

<img src="https://mintcdn.com/moengage/Jtvf10ggM77HdKvB/images/iOSPushConfiguration1-1.png?fit=max&auto=format&n=Jtvf10ggM77HdKvB&q=85&s=28219603ac30baa27066118b3d1e7424" alt="I OS Push Configuration1 1" width="1932" height="84" data-path="images/iOSPushConfiguration1-1.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 :

<img src="https://mintcdn.com/moengage/Jtvf10ggM77HdKvB/images/iOSPushConfiguration2-1.png?fit=max&auto=format&n=Jtvf10ggM77HdKvB&q=85&s=c42dbd8162d47694ed6ab4c9a0d7b21a" alt="I OS Push Configuration2 1" width="1960" height="468" data-path="images/iOSPushConfiguration2-1.png" />

## Push Registration

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

<CodeGroup>
  ```javascript JavaScript theme={null}
  var moe = new MoECordova.init();
  moe.registerForPushNotification();
  ```
</CodeGroup>

Push token generated is received from `onPushTokenGenerated` callback

<CodeGroup>
  ```javascript JavaScript theme={null}
  moe.on('onPushTokenGenerated', function (payloadInfo) {
      console.log('pushToken generated' + JSON.stringify(payloadInfo)); 
      });
  ```
</CodeGroup>

## 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:

* [Rich Push](/developer-guide/ios-sdk/push/basic/ios-push-integration-tutorial#optional)
* [Push Templates](/developer-guide/ios-sdk/push/optional/push-templates)
