How to Send the APNS to specific IOS user using Python

Kunj Thakor 1 Reputation point
2022-05-24T09:41:31.287+00:00

def send_apple_notification(self, payload, tags=""):
nh = Notification("apple", payload)
self.send_notification(nh, tags)

-This is my function how to send the message to the specific user with User's Device ID

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.
262 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 22,401 Reputation points Microsoft Employee
    2022-05-26T19:27:23.103+00:00

    @Kunj Thakor , Thanks for the follow-up and additional info.

    Irrespective of the language framework, everything ultimately wraps our REST API. They should be registering device with a unique tag. If you’re using installations, the userID property is one way to do this: Create or overwrite an installation

    You can then target the specific device using either installationId or userId. See here for tag format (it’s similar for userId):
    registration-management#installations

    Additional :
    Can Azure push the same notification to multiple apps (different bundle Id's) from one notification hub” --

    “This is not possible to do with Notification Hubs. You would need to set up multiple hubs for each bundle ID and each app would then register with the specific hub they belong to. Also, this is even recommended just between sandbox/production usage for an app developer – Example: have a myhub-sandbox and myhub-production. The sandbox hub would hold the sandbox credential and the production hub the production credentials. Then the client app itself should know which variant it is and register with the correct hub. Then push the identical notification to each of the hubs you want to target.”

    1 person found this answer helpful.