APNS handle obtained by Expo in React Native is incorrect

EXPO SDK Version: 42.0.01 Developing for: iOS

Our goal:

  • successfully send a test notification from Test Send tool in Azure Notification Hub to a registered physical iPhone which is running a local instance of an EXPO app.

Progress:

  • we're able to successfully register a physical iPhone with Azure Notification Hub without using a 3rd party library. We can see that registration in the Hub.

Issues:

  • when using the Azure's Test Send tool we're getting an error "The Push Notification System handle for the registration is invalid" and the test notification does not get delivered.

Debugging:

  • we're using EXPO's Notifications.getDevicePushTokenAsync() API to obtain the push token.
  • Azure support team analysed the logs and concluded that the problem is the PNS handle i.e. Apple's ID of the phone registered for notifications.
  • the phone's PNS handle remains the same at all times.
  • by using "expo credentials:manager" I've added a new Push Notification Key using KeyID, TeamID and .p8 certificate - the PNS handle didn't change after doing that and notifications were failing too.

I haven't found any tools to validate the APNS handle. I'm currently awaiting a .p12 certificate from our corporate team to test notifications by using https://pushtry.com/.

How do we validate the APNS handle and if found that it's invalid - how do we cycle it / request another?

I am also facing the same issue. Were you able to achieve the goal mentioned in this post ?

I switched to a Bare React Native Project. I used the package @react-native-community/push-notification-ios to get the device token. I was able to successfully receive the notification sent through Azure Notification Test Hub on a physical iOS device

APNS handle obtained by Expo in React Native is incorrect
 
 
Q