Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot send push notifications iOS using APN Auth Key

I attempting to send a push notification to my react native project. When sending to single device (provided FCM Token), it thrown an error

Invalid APNs certificate. Check the certificate in Settings.

So my assumption is the notification message is even not yet sent to APN, which my device obviously will not gonna receive anything

Please help

edit

I already uploaded my APN Authentication Key. Firebase docs says that I need to use either APN Authentication Key or APN Certificates

like image 902
Kevin Dave Avatar asked Jan 12 '18 08:01

Kevin Dave


People also ask

How do I use Apple push notifications for APN?

Establish a Connection to APNs Use HTTP/2 and TLS 1.2 or later to establish a connection between your provider server and one of the following servers: Development server: api.sandbox.push.apple.com:443. Production server: api.push.apple.com:443.

What is APN auth key?

APNs Auth Key OverviewIn order to send Push Notifications to your iOS device, you need APNs Push Certificate, or an APNs Auth Key file for your application and upload it to the Responsys Mobile App Developer Console. See Apple's instructions for more information about generating Authentication Key Files.

How do I install APNs auth key?

Copy your Team ID, head over to the CleverTap dashboard, and navigate to Settings > Mobile Push > iOS. Select the Provider authentication token (Auth Key) and upload the APNs Auth Key file you downloaded earlier, and paste your Team ID and your app's bundle ID. Your app's bundle ID can be found in Xcode.


2 Answers

Revoking and re-uploading the key worked for me.

like image 73
osrl Avatar answered Oct 30 '22 04:10

osrl


You are trying to push notification with no APNs Certification assign.

Please check the link below to generate or create the certificate to allow firebase send push notification in iOS.

https://firebase.google.com/docs/cloud-messaging/ios/certs

Here are the React-Native plugin and instruction for FCM (Firebase Cloud Messaging)

https://github.com/evollu/react-native-fcm

Hope it could help you.

like image 23
Seyha Avatar answered Oct 30 '22 04:10

Seyha