Guide: How to Generate a .p12 File for iOS Push Notifications

This guide will walk you through creating a .p12 certificate file required for enabling push notifications in your iOS application.

Step 1: Log in to Apple Developer Account

1

Go to Apple Developer Account

Visit the Apple Developer portal at developer.apple.com

2

Sign In

Sign in using your Apple Developer credentials

Step 2: Create an App ID with Push Notification Enabled

1

Navigate to Certificates

In the left menu, click Certificates, Identifiers & Profiles

Apple Registration
2

Go to Identifiers

Go to Identifiers → App IDs

3

Create New App ID

Create a new App ID (or select an existing one)

Apple Registration

To create a new App ID click on Plus icon (+), then check the App IDs and click on Continue button

Apple Registration
4

Select App Type

Select a type as App and click on Continue button

Apple Registration
5

Enter App Details

Description: Enter your app name (e.g., MyApp iOS)

Bundle ID: Select Explicit App ID and enter the bundle identifier in reverse-domain style (e.g., com.company.myapp)

Apple Registration
6

Enable Push Notifications

Scroll down to the Capabilities section and check the box for Push Notifications

Apple Registration
7

Complete Registration

Click Continue → then click Register to create the new App ID

New App ID created successfully

Apple Registration

Step 3: Generate a Certificate Signing Request (CSR) on Your Mac

1

Open Keychain Access

Open Keychain Access on your Mac

2

Request Certificate

From the menu bar, go to: Keychain Access → Certificate Assistant → Request a Certificate From a Certificate Authority...

3

Enter Details

Enter your email address and Common Name

4

Save CSR File

Select Saved to disk, then click Continue

A .certSigningRequest (CSR) file will be saved to your computer

Step 4: Create an APNs Certificate in Apple Developer Account

1

Go to Certificates

In your Developer account, go to Certificates → click +

2

Select Certificate Type

Choose Apple Push Notification service SSL (Sandbox & Production)

3

Select App ID

Select the App ID created earlier

4

Upload CSR File

Upload the CSR file you created

5

Download Certificate

Download the generated .cer file

Step 5: Export .cer to .p12 File

1

Add to Keychain

Double-click the .cer file to add it to Keychain Access

2

Locate Certificate

In Keychain Access, find your certificate under My Certificates

3

Export Certificate

Right-click the certificate → choose Export

4

Save as .p12

Save it as a .p12 file

You'll be asked to set a password — remember it, as you'll need it when uploading to Nexbyte

Step 6: Upload .p12 File to Nexbyte App Builder

1

Log in to Nexbyte

Log in to your Nexbyte App Builder panel

2

Navigate to Push Notifications

Navigate to the Push Notification setup section

3

Upload Files

Upload the .p12 file along with the password you set

4

Complete Setup

Once uploaded, your iOS app will be ready to send push notifications

⚠️ Important Notes

  • The .p12 file is valid for 1 year. You must renew it annually
  • Keep both the .p12 file and its password secure
  • If you lose it or the certificate expires, you'll need to repeat the process