2

I'm having trouble figuring out what the keyId is for iOS Push Notifications.

I saw this question but it seems a bit out of date. Apple doesn't seem to give out .p8 files for development anymore and they don't mention the keyId when downloading.

Also, I'm using this library to send the notifications.

Any ideas where to find this?

Edit:

enter image description here

Above is the screen I get when trying to get the .p8 file from Apple. When clicking download it gives me a .cer file with no keyId.

Community
  • 1
  • 1
Charlie Fish
  • 18,491
  • 19
  • 86
  • 179
  • The detail is on [the site](https://eladnava.com/send-push-notifications-to-ios-devices-using-xcode-8-and-swift-3/) linked to in the answer to question you referenced; When you generate the p8 file on the Apple developer portal the key id is shown on screen. I don't know why you say the linked question is out of date, it is 100% correct – Paulw11 Apr 01 '17 at 08:38
  • @Paulw11 Just added a screenshot of what I get from Apple after choosing `APNs Auth Key` and following the steps as discussed on the site you linked above. – Charlie Fish Apr 01 '17 at 08:42
  • @Paulw11 I'm also getting an error `VError: Failed to generate token: error:0906D06C:PEM routines:PEM_read_bio:no start line` but I'm guessing once I solve this issue that error will be fixed. – Charlie Fish Apr 01 '17 at 08:43
  • 1
    You aren't generating the right thing. You need to select "Apple Push Notification Authentication Key (Sandbox & Production)", under "production", then you will get a screen with the key id and a link to the p8 file. You know you have the right option when it doesn't ask you to upload a certificate signing request and the expiration is "never" – Paulw11 Apr 01 '17 at 08:51

1 Answers1

-1

Check How to use Apple's new .p8 certificate for APNs in firebase console

To generate .p8 file, you need to select "Apple Push Notification Authentication key (Sandbox and Production)" under production section.

Community
  • 1
  • 1
ATilara
  • 501
  • 9
  • 14