Hey,
I build my app with Expo Push Notifications and they work both on android and iOS when running in Expo App. But when I am in production it only works on android. I tried deleting all profiles and identifiers and keys and rebuild them with Expo. I tried creating my own p8 and csr, everything i found on the internet. But still no push notifications, and also not with the PushNotif-Tool.
You will receive the error message and try to fix that.
In my case, I used p12 certificate instead of p8 key, that’s why it couldn’t send push notification.
Thank you, I got that result:
{“data”:{“ab969f69-3ab0-4bcb-b69f-9e4d5ec064f2”:{“status”:“error”,“message”:“The Apple Push Notification service failed to send the notification (reason: InvalidProviderToken, status code: 403). Read Apple’s docs about "Communicating with APNs" to learn what this error means.”,“details”:{“apns”:{“reason”:“InvalidProviderToken”,“statusCode”:403},“error”:“InvalidCredentials”,“sentAt”:1567495589},“__debug”:{}}}}
If I search for “InvalidProviderToken” I only find “create an Apple Push Notification Authentication Key (Sandbox & Production)” but I already have one. What should I do now?
If I delete all certificates, profiles and identifiers. What do I have to do step by step to get all right? (including expo build etc.) Just to make sure.
You’ll want to run build:ios and then let Expo generate them for you again. You won’t actually have to submit the new build or anything, you’ll just need to ensure the credentials were properly generated.
Okay now I’m getting:
{“data”:{“223b9627-2705-4182-accf-b8595976aa47”:{“status”:“error”,“message”:“The Apple Push Notification service failed to send the notification (reason: BadDeviceToken, status code: 400). Read Apple’s docs about "Communicating with APNs" to learn what this error means.”,“details”:{“apns”:{“reason”:“BadDeviceToken”,“statusCode”:400},“sentAt”:1567589947},“__debug”:{}}}}
The error indicates the token is invalid. Can you try testing sending a notification to said token with our testing tool: Push Notification Tool — Expo
When you start your App on iOS Standalone, have you been asked for notification permissions?
How does the scheme of your Token looks like in the Database for this specific user?
I had problems too but due to an implementation error not following the EXPO docs correctly.