Push notification is the most important part of any app. It will notify the customer by sending the message with the title that pops up on a mobile device. In June 2008, Apple launches the first push service Apple Push Notification Service (APNs). It enables third-party application developers to send push notifications to iOS users.
1.) .p12 key expires in 1 year while in .p8 doesn’t expire.
2.) .p12 key created for every project unique while in .p8 creates one for whole apps on the account to send the notification.
3.) .p12 can be downloaded any time if you lose the certificate of it while in the case of .p8 you have saved it in a secure place because it downloaded once from your account, if you want it again then you have to revoke the previous key then you can download new key.
4.) .p12 keys for production and development are different and mixed up for different environment certificates and unable to send push notification to Testflight / App Store while in .p8, there is a single key for both and works in both development and production environment (no need to switch between certificates).
1.) To create a .p8 key file, go to Apple developer account , then select Certificates, IDs & Profiles.
2.) Next, select the key.
3.) Add the new key by clicking the “+” sign.
4.) Next check the Apple Push Notification service (APNs) box, then click “Continue” and click “Register’.
5.) Proceed to download the key file by clicking Download
Note: After downloading your key, it cannot be re-downloaded as the server copy is removed. If you are not prepared to download your key at this time, click and Done and Download it at a later time. Be sure to save a backup of your key in a secure place
1.) Create the account in the Firebase and then create the project in it.
2.) Open your project and click take left side navigation bar setting icon then select the project setting.3.) On the project settings, click on the header Cloud Messaging tab.
4.) Now go to the iOS App section at the bottom of the page, then proceed to APNs Authentication Key, then click Upload to upload your .p8 key file.
5.) There are also two fields in it, which are the Key ID and Team ID.
Key ID: This ID is getting while you creating .p8 file in the app store.
Team ID: This ID is of your Apple Developer Account Team ID.
Upload the .p8 key and fill both fields.
Now you can send push notifications from Firebase’s Cloud Messaging using the .p8 key file.
Be the first to comment.