Since I didn't find any .p8 files in your workspace, you likely need to generate a new one.
Failed push notifications on iOS are almost always due to a missing APNs Authentication Key. Firebase needs this key to talk to Apple's Push Notification Service.
Follow these steps exactly:
- Go to Apple Developer Console > Certificates, Identifiers & Profiles > Keys.
- Click (+) to create a new key.
- Name it
Firebase Push Key. - Check the box for Apple Push Notifications service (APNs).
- Click Continue -> Register.
- Download the key file (
AuthKey_XXXXXXXXXX.p8).- Warning: You can only download this ONCE. Keep it safe.
- Copy the Key ID (10-character code, e.g.,
XXXXXXXXXX). - Copy your Team ID (found in top right of developer console).
- Go to the Firebase Console.
- Open your Project settings (⚙️ icon).
- Click the Cloud Messaging tab.
- Scroll down to Apple app configuration.
- Look for APNs Authentication Key and click Upload.
- Upload the
.p8file you just downloaded. - Enter your Key ID and Team ID.
- Click Upload.
After uploading, restart your iOS app.
- The app will request a new token.
- The server will register it.
- Send a test message using
server/scripts/test-push.jsor the Admin Dashboard.