Follow these steps to generate p12 or p8 file for push notification:
- In your developer account, go to Certificates, Identifiers & Profiles.
- Under Identifiers, select App IDs and create a new App ID.
- Specify App name, Bundle ID and select Push Notifications, then Continue
- Click Register, then Done to complete app registration
- Now, you can see the app listed in App IDs
- Launch the Keychain Access application in your Mac OS X and Select Keychain Access -> Certificate Assistant -> Request a Certificate From a Certificate Authority
- Enter email address and check the ‘Saved to disk’ option, then click Continue
- Save certificate
- Go back to developer account and select app from App IDs and click Edit
- Scroll Down to Development SSL certificates and click Create Certificate
- Click Continue
- Choose certificate file created from Keychain Access in previous section and click Continue
- Download Development Certificate and click Done to finish process
- Double click Development certificate generated in previous step to add it to Keychain Access. Go to Keychain Access, select login keychain and My Certificate from side menu. Find app certificate and right click to export it
- Enter certificate name and click Save
- Enter password for certificate and click OK
This development .p12 certificate can be used to send push notification.
- In your developer account, go to Certificates, Identifiers & Profiles.
- Under Keys, select All and click the Add button (+) in the upper-right corner.
- Under Key Description, enter a unique name for the signing key.
- Under Key Services, select the APNs checkbox, then click Continue.
- Review the key configuration, then click Confirm.
- Click Download to generate and download the key now. If you download the key, it is saved as a text file with a .p8 file extension. Save the file in a secure place because the key is not saved in your developer account and you won’t be able to download it again.
- In your developer account, go to Membership.
- Get the Team ID.