iOS swift How to create .p8 file?
Asked Answered
A

4

16

I am working with Pushy Notification where I need to register with the p8 file. So how can I create that p8 file from developer account?enter image description here

Apodictic answered 19/6, 2017 at 13:23 Comment(2)
developer.apple.com/account/ios/authkeyMarolda
Hopefully your customers aren't offended by all that pushing.Saguenay
M
28

May 2021 - The p8

The issue that I had was I couldn't find the way to create the .p8 file and all methods gave me .cer file instead.

  1. Head to your Apple developer account

  2. Go to the keys section and click on the plus button (or click here):

⚠️ It is very important to select the keys section and NOT the certificate or identifiers. otherwise you will get the .cer file at last 🤷🏻‍♂️

Keys section

  1. Select the Apple push notification service: Options

⚠️ Note that since it is very powerful certificate, it is very limited and you can not have much of these. So if you already created one, you will face something like this image and you should use that file or just revoke the old one.

  1. Download the.p8 file and secure it somewhere.
Monadelphous answered 14/5, 2021 at 11:34 Comment(2)
Don't understand why it is not so clear in Apple's docs.Laciniate
I invite you to see this then @LaciniateMonadelphous
P
8

Follow these steps:

Generate an APNs Auth Key
Open the APNs Auth Key page in your Developer Center and click the + button to create a new APNs Auth Key.

enter image description here

In the next page, select Apple Push Notification Authentication Key (Sandbox & Production) and click Continue at the bottom of the page.

enter image description here

Apple will then generate a .p8 key file containing your APNs Auth Key.

enter image description here

Download the .p8 key file to your computer and save it for later. Also, be sure to write down the Key ID somewhere, as you'll need it later when connecting to APNs.

Send Push Notifications

Ref: APNS (Configure push notifications)

Important: Save a back up of your key in a secure place. It will not be presented again and cannot be retrieved later.

Pandybat answered 19/6, 2017 at 15:59 Comment(6)
Thanks for the updated. The APNs and auth key option doesn't appear in my developer account. Is there any special requirement for that?Apodictic
@KushalManiyar - It can be generated once and won't be visible (removes APNS Auth key options) again. Here is reference to your query (help.apple.com/xcode/mac/current/#/…). If you have generated it previously, then it won't be visible to you again.Pandybat
Is it possible to revoke the key and generate new one? In my account it shows, it has exceeded the limits. I want to revoke it and generate a new one. Is this possible? Also will this affect existing apps?Enrica
@yaali - Raise a new question with full description of your problem, I'll surely help you to find out solution to your problem, with valid evidencePandybat
@Pandybat I have tried to configure Apple APN with Firebase FCM, but I keep getting an error. Could you please help me with an answer stackoverflow.com/questions/50292269Roadstead
How do you recommend storing the .p8 file? I assume you don't want it just sitting there plaintextIsom
Q
2

For the new current Apple Developer site these are the steps:

Certificates, Identifiers & Profiles > Keys > Click "+" > Check Apple Push Notifications service (APNs)

Choose a name, then register it. It will give you an option to download the p8 file.

Quintile answered 2/7, 2020 at 14:21 Comment(0)
C
1

First login Apple developer a/c. Go to Keys option, click + button

enter image description here

Than on next page, enter valid Name, check Push notification option and click, click continue, click download button, It will download .p8 file.

Conroy answered 27/5, 2019 at 6:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.