P2 file is a distribution certificate identifies your team/organization within a distribution provisioning profile and allows you to submit your app to the Apple App Store. It is contains the certificates Apple requires to build and publish iOS apps.
v Log in to the Apple Developer Portal.
v
Navigate to Certificates,
IDs & Profiles > Identifiers > App IDs and click the App ID
associated with your app.
v
On the screen for your App
ID, check Capabilities > Push Notifications.
v
Click Save and respond to
the Modify App Capabilities dialog box that appears.
v
To create the certificate,
we will use to communicate with Apple when sending push notifications:
v
In a new browser tab,
follow Apple's Create a certificate signing request instructions.
v
In the Apple Developer
Portal, navigate back to your App ID.
v
Click Capabilities >
Push Notifications > Configure.
v
Click one of the following
buttons:
v
Development SSL Certificate
> Create Certificate (for testing push notifications while developing an iOS
app)
v
Production SSL Certificate
> Create Certificate (for sending push notifications in production)
v
Click Choose File and
select the certificate signing request you created above.
v
Click Continue.
v
Click Download to download
the certificate.
v
Use this file to export a
.p12 file in the next step.
v
Navigate in the Apple
Developer Portal to Certificates, IDs & Profiles > Provisioning
Profiles.
v
Click the provisioning
profile you'd like to edit.
v
Edit the provisioning
profile as necessary, and click Save.
v
Click Download, and
double-click the downloaded provisioning profile to install it.
v
Make sure your Xcode
project is configured to use the provisioning profile as necessary.Next, export
the downloaded certificate (.cer file) as a .p12 file that can be uploaded to
firebase:
v
On your Mac, double-click
the .cer file to open it in Keychain Access.
v
In Keychain Access, in the
lower-left corner, select Category > Certificates.
v
Select the certificate to
export.
v
Choose File > Export
Items.
v
Enter a name in the Save As
field.
v
Accept the default .p12
file format and click Save. Respond to the prompts, and enter a password for
the file if necessary.
v
Keep track of this file,
since you'll upload it to firebase in a later step.
Comments