MadMac
MadMac

Reputation: 4963

iOS Push notifications with a .p8 key not working from Firebase

APNs authentication key (.p8)

I have tried sending to only iOS devices from the firebase console and also by topic however nothing is getting to the device. I have used p12 successfully in the past.

I have added the GoogleService-Info.plist file to the app and deployed to the App Store. I am using @capacitor-community/fcm in the App and have followed the instructions here: https://github.com/capacitor-community/fcm#certificate

I am testing in production as it didn’t work in dev with a provisioning profile. Everything works ok for Android.

Any suggestions on how to troubleshoot?

UPDATE: I have also tried following the instructions here however the code errors in Xcode at Messaging.messaging().apnsToken = deviceToken: https://capacitorjs.com/docs/guides/push-notifications-firebase#add-initialization-code

Upvotes: 0

Views: 1590

Answers (1)

MadMac
MadMac

Reputation: 4963

I got it working by following this guide: https://devdactic.com/push-notifications-ionic-capacitor/

There are some differences in the Podfile and AppDelegate.swift otherwise it is pretty much the same.

Upvotes: 0

Related Questions