Push Notifications not working on iOS

Please provide the following:

  1. SDK Version: 36.0.0
  2. Platforms(Android/iOS/web/all): iOS

Hey,
I build my app(In-house App) with Expo Push Notifications and they work both on android and iOS when running in Expo App.

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 PushNotifcation-Tool.

https://exp.host/--/api/v2/push/getReceipts

{"data":{"1c0c36ca-c29e-4f70-9aaa-1ccb32c8b571":{"status":"error","message":"The Apple Push Notification service failed to send the notification (reason: TopicDisallowed, status code: 400). Read Apple's docs about \"Communicating with APNs\" to learn what this error means.","details":{"apns":{"reason":"TopicDisallowed","statusCode":400},"sentAt":1581317119},"__debug":{}}}}

What else can I try?

Hi! Sorry you’re running into this issue, troubleshooting push notification problems is always somewhat difficult. Have you changed your bundleIdentifier at all?

1 Like

Yes, I have. I changed bundleIdentifier to com.innored.cv
(I tried deleting all profiles and identifiers and keys and rebuild them with Expo)

I’m testing with two apps.

bundleIdentifier : com.innored.cv

https://exp.host/--/api/v2/push/getReceipts

{"data":{"492af03d-e717-44af-952f-c6a902611a82":{"status":"error","message":"The Apple Push Notification service failed to send the notification (reason: TopicDisallowed, status code: 400). Read Apple's docs about \"Communicating with APNs\" to learn what this error means.","details":{"apns":{"reason":"TopicDisallowed","statusCode":400},"sentAt":1581379588},"__debug":{}}}}

bundleIdentifier : com.innored.creatiview20

https://exp.host/--/api/v2/push/getReceipts

{"data":{"ef8b45b7-332c-4dad-a2e8-4ef1a015509a":{"status":"error","message":"The Apple Push Notification service failed to send the notification (reason: TopicDisallowed, status code: 400). Read Apple's docs about \"Communicating with APNs\" to learn what this error means.","details":{"apns":{"reason":"TopicDisallowed","statusCode":400},"sentAt":1581380277},"__debug":{}}}}

This has to do with the bundle Identifier sent in association with the push notifications. I would double-check that all your certs are based off of the new bundle identifier (use expo credentials:manager to see all the credentials we have stored for you), and I’d also suggest checking the expoPushTokens to see if they changed when switching bundle identifiers

1 Like

Used the expo credentials manager to remove the certs/keys from both of my Expo apps.

Deleted all Distribution Certificates
Deleted all Profiles
Deleted all Keys

expo credentials:manager

Built the app

expo build:ios

? How would you like to upload your credentials?
:heavy_check_mark: Expo handles all credentials, you can still provide overrides

? Will you provide your own Apple Distribution Certificate?
:heavy_check_mark: Let Expo handle the process

? Will you provide your own Apple Push Notifications service key?
:heavy_check_mark: Let Expo handle the process

We’re going to generate:

  • Apple Distribution Certificate
  • Apple Push Notifications service key
  • Apple Provisioning Profile
    :heavy_check_mark: Generated Apple Distribution Certificate
    :heavy_check_mark: Generated Apple Push Notifications service key
    :heavy_check_mark: Generated Apple Provisioning Profile

Successfully built standalone app

I export “ in-house ” developed iOS app as an enterprise application.

I have tested the following on multi device.

get a token [ OK ]
sending message with Push notifications tool [ FAIL ]
sending message with Curl [ FAIL ]

I’m testing with two apps.

bundleIdentifier : com.innored.cv

https://exp.host/--/api/v2/push/getReceipts

{"data":{"492af03d-e717-44af-952f-c6a902611a82":{"status":"error","message":"The Apple Push Notification service failed to send the notification (reason: TopicDisallowed, status code: 400). Read Apple's docs about \"Communicating with APNs\" to learn what this error means.","details":{"apns":{"reason":"TopicDisallowed","statusCode":400},"sentAt":1581379588},"__debug":{}}}}

bundleIdentifier : com.innored.creatiview20

https://exp.host/--/api/v2/push/getReceipts

{"data":{"ef8b45b7-332c-4dad-a2e8-4ef1a015509a":{"status":"error","message":"The Apple Push Notification service failed to send the notification (reason: TopicDisallowed, status code: 400). Read Apple's docs about \"Communicating with APNs\" to learn what this error means.","details":{"apns":{"reason":"TopicDisallowed","statusCode":400},"sentAt":1581380277},"__debug":{}}}}

The “topic” here refers to the apns-topic header value, which the Expo Push Notification service is responsible for setting. It uses the bundle identifier of the app that registered its device token. I looked up the bundle identifier associated with the second push receipt you posted and verified that it is com.innored.creatiview20.

Since the service is working well for everyone else, I suspect the issue may lie with your Apple Developer Console. For instance, I would make sure that an App ID with the given bundle identifier is correctly registered in your Apple Developer Console, and that push notifications are enabled for it.