Please provide the following:
- SDK Version: 42.0.01
- Platforms(Android/iOS/web/all): iOS
- Add the appropriate “Tag” based on what Expo library you have a question on.
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?