Caio
Caio

Reputation: 81

Ios Push notification passphrase

I would like to know where I get this information:

(iOS) Private key's passphrase.private static $passphrase = 'joashp';

I'm using this script in my PHP to send notifications to IOS, but so far I'm not getting it.

https://gist.github.com/joashp/b2f6c7e24127f2798eb2

Can someone guide me on this?

Upvotes: 1

Views: 2899

Answers (1)

Marcus Adams
Marcus Adams

Reputation: 53870

This is when you export your APNS certificate to a file. You'll typically be asked for a passphrase to secure the file if you export to a file format that includes the private key.

You'll need to export the certificate from the computer where you created the CSR to get the private key. Exporting the Apple Push Services certificate from your Mac with Keychain Access and choosing the .P12 file format will include the private key and prompt you for a passphrase to secure the file.

  1. Create the APNS certificate from developer.apple.com by uploading a CSR file created on your Mac.
  2. Download that certificate and install it on your Mac.
  3. Export the certificate to a .p12 file, securing it with a passphrase.
  4. Upload that .p12 file to your server to be able to connect to the APNS service and send a push notification.

Upvotes: 2

Related Questions