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.
- Head to your Apple developer account
- Go to the keys section and click on the plus button (or click here):
⚠️ It is very important to select the
keyssection and NOT thecertificateoridentifiers. otherwise you will get the.cerfile at last ??♂️

- Select the Apple push notification service:

⚠️ 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.
- Download the
.p8file and secure it somewhere.