# iOS Push Notification Certificate Setup

In order to send or receive push notifications using our SDK, you would need to create push notification certificates from Apple Developer Console & Upload in our Amity console.

Here are the steps to generate push notification certificate from Apple Developer Console.

{% hint style="info" %}
When a new .p12 certificate is created, previous certificate gets revoked and cannot be used again.
{% endhint %}

**Step 1:**&#x20;

Go to Apple Developer Console (i.e [https://developer.apple.com](https://developer.apple.com/)) and click on Certificates.

<figure><img src="https://2352509137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX0mOAVWkotGme0iRzu%2Fuploads%2FcGjrHhvs8At9zkIvaoD5%2FPush%20-%201.png?alt=media&#x26;token=38b666cb-16ee-4354-ad04-05562fbad665" alt=""><figcaption></figcaption></figure>

**Step 2:**&#x20;

Select Apple Push Notification Service SSL (Sandbox & Production)

<figure><img src="https://2352509137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX0mOAVWkotGme0iRzu%2Fuploads%2FO2IWkPaea1sil0Ta0nzH%2FPush%20-%202.png?alt=media&#x26;token=b5de7a1f-4aaf-4f5b-b9ec-2cd76af2273f" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
This certificate will be applicable for both Sandbox & Production environments so you do not need to create a separate for each one.&#x20;
{% endhint %}

**Step 3:**&#x20;

Follow the rest of the steps of creating certificates as shown by apple & download the **.cer** file.

**Step 4:**&#x20;

Double click on **.cer** file you downloaded in the last step in Finder. After few seconds, Keychain Access program should open.

**Step 5:**&#x20;

Select **Login → My Certificates**, then right click on the Apple Push Services certificate that you just installed. It would show you with some options as shown below.

<figure><img src="https://2352509137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX0mOAVWkotGme0iRzu%2Fuploads%2FPXplNPr43nRSO16NsqXr%2FPush%203.png?alt=media&#x26;token=6d767744-2da1-45ec-9f78-52790dcbf206" alt=""><figcaption></figcaption></figure>

**Step 6:**&#x20;

Select **Export “Apple Push Services …”** option and save the file using .p12 extension. If you add a password while exporting, you will need to enter the same password in Amity Console.

**Step 7:**&#x20;

Open Amity Console. Select **Settings → Push Notifications** & Upload this .p12 file to Amity Console.

<figure><img src="https://2352509137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX0mOAVWkotGme0iRzu%2Fuploads%2F9FbNA1Na5Nrp7cPIlt4D%2FPush%204.png?alt=media&#x26;token=325e838f-e198-49a7-a3bd-7514b47c1553" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
This certificate can be used to receive push notification in your production build (Distributed through Appstore or Testflight). Currently we do not support receiving push notification in Debug build.
{% endhint %}

That’s it. Now the certificate is setup, Please follow the steps shown in [Register & Unregister Push Notifications](https://docs.social.plus/~/changes/5GVz91dkzloMulIORPZq/amity-sdk/core-concepts/push-notifications/register-and-unregister-push-notifications-on-a-device) section to correctly send APNS token to receive push notification.

{% hint style="info" %}
Please make sure you have **Push Notification** capabilities enabled in your Xcode Project.
{% endhint %}
