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

# iOS Push Configuration

# Configuring Push in iOS

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 to the [link](/developer-guide/ios-sdk/push/basic/apns-authentication-key) to generate Auth key.

## APNS Certificate

First, you must create an APNS certificate and upload it to the dashboard to send push notifications on iOS. Follow the steps below to do that:

* [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)

Follow the links on each step to complete it.

## Project Capability Changes

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. Also, we make use of silent pushes to track uninstalls. For tracking uninstalls of all the users, enable Remote Notification background mode in the app's capabilities as shown below:

## Push Registration

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

<CodeGroup>
  ```auto Dart theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import 'package:moengage_flutter/moengage_flutter.dart';
  final MoEngageFlutter _moengagePlugin = MoEngageFlutter(YOUR_APP_ID);
  _moengagePlugin.initialise();
  _moengagePlugin.registerForPushNotification();
  ```
</CodeGroup>

## Provisional Push Registration:

<Info>
  This feature is supported from version ***9.0.0*** of the plugin.
</Info>

To register for provisional push notification, call [***registerForProvisionalPush()***](https://pub.dev/documentation/moengage_flutter/latest/moengage_flutter/MoEngageFlutter/registerForProvisionalPush.html) API of the plugin as shown below.

<CodeGroup>
  ```auto Dart theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import 'package:moengage_flutter/moengage_flutter.dart';
  MoEngageFlutter _moengagePlugin = MoEngageFlutter(YOUR_APP_ID);
  _moengagePlugin.initialise();
  _moengagePlugin.registerForProvisionalPush();
  ```
</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)
* [Push Templates](/developer-guide/ios-sdk/push/optional/push-templates)
