How to re-register device in Azure Notification Hub and send push to old passes in the Apple Wallet?

Mahalakshmi 0 Reputation points
2024-01-26T08:53:36.5733333+00:00

Hi , We are using Azure Notification Hub to deliver PUSH to PASSES in the APPLE WALLET.
Recently we removed and deleted the Hub and trying to re-register the devices with same token. New PASSES in the Apple Wallet Receives push. But Old PASSES didn't receive push.
Our requirement is How to make OLD PASSES to receive PUSH .
Why it is happening ? How to resolve this? kindly help me on this.
awaiting for reply

Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
245 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
843 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 14,231 Reputation points Microsoft Employee
    2024-01-28T04:09:02.58+00:00

    @Mahalakshmi To re-register devices in Azure Notification Hub and send push notifications to old passes in the Apple Wallet, you can follow these steps:

    1. Device Registration: Device registration with a Notification Hub is accomplished using a Registration or Installation. A registration associates the Platform Notification Service (PNS) handle for a device with tags and possibly a template. The PNS handle could be a ChannelURI, or device token registration ID.
    2. Installations: An Installation is an enhanced registration that includes a bag of push related properties. It is the latest and best approach to registering your devices using the server-side .NET SDK. You can also use the Notification Hubs REST API approach to register installations on the client device itself.
    3. Backend Endpoint: Assuming you are storing the ‘old’ token on the device, you have to implement the following logic in the backend: An endpoint that takes two parameters: ‘oldToken’, ‘newToken’. This basically, either creates a new registration (change template/native or tags as needed) or updates the current one.
    4. Check Active Devices: Connect to Azure from Server Explorer, find Notification Hub section, select your hub. On the right side, you will see two tabs: Test Send and Device Registration. On Device Registration tab, you will see a list of registrations. You can edit or delete them.

    Please note that these steps are a high-level guide. For detailed instructions, you may want to refer to the official Microsoft Learn documentation and the tutorial on setting up your iOS app to work with Azure Notification Hubs. If you’ve followed these steps and are still experiencing issues, it might be due to a variety of factors such as changes in the device token, issues with the PNS, or problems with the Notification Hub. It’s recommended to check the debug logs.