# iOS Push Notification Certificate Setup

To send or receive push notifications for iOS devices using our SDK, you can either

* Create push notification certificate (.p12 certificate) from the Apple Developer Console OR
* Create a push notification Key (.p8 certificate) from Apple Developer Console

and upload to our social.plus console.

<figure><img src="https://2352509137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX0mOAVWkotGme0iRzu%2Fuploads%2FFsfUlwluunIatWVXGI1E%2FScreenshot%202025-06-24%20at%2018.07.27.png?alt=media&#x26;token=f17a929b-da68-45cd-9369-1753c3148af8" alt=""><figcaption></figcaption></figure>

We recommend creating Apple Push Notification Key as it is more versatile. You can follow the steps outlined here to generate the APNS key (with .p8 file extension)\
<https://developer.apple.com/documentation/usernotifications/establishing-a-token-based-connection-to-apns>\\

If you do not support Apple Push Notification Key and want to use certificate based authentication for push notification (i.e .p12 file), here are the steps to generate a push notification certificate from the Apple Developer Console.

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

**Step 1:**

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

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 one for each one.
{% endhint %}

**Step 3:**

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

**Step 4:**

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

**Step 5:**

Select **Login → My Certificates**, then right-click on the Apple Push Services certificate that you just installed. It would show you 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:**

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

**Step 7:**

Open social.plus Console. Select **Settings → Push Notifications** & Upload this .p12 file to social.plus 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 notifications in your production build (Distributed through Appstore or Testflight). Currently, we do not support receiving push notifications in the Debug build.
{% endhint %}

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

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