MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.23k stars 21.41k forks source link

Regarding the device registration or installation.[New Comment] #122390

Open shravankumarbj opened 4 months ago

shravankumarbj commented 4 months ago

Hi,

We use windows azure notification sdk for APNS for our app. We have a scenario that users who deleted app must not get push notification. Hence my backend developer is asking me whether we are registering or installing the token. Here is the background of the question. And below is the code we use to register device token in app.

MSNotificationHub.didRegisterForRemoteNotifications(withDeviceToken: token)

Request you to help us in this matter to know whether we are registering or installing.

Regards, Shravana


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

TPavanBalaji commented 4 months ago

@shravankumarbj It would be great if you could add a link to the documentation you are following for these steps? This would help us redirect the issue to the appropriate team. Thanks!

TPavanBalaji commented 4 months ago

@shravankumarbj We are going to close this thread if there are any further questions regarding the documentation, please tag me in your reply and we will be happy to continue the conversation.

shravankumarbj commented 4 months ago

Hi @TPavanBalaji

Apologies for late reply..

I shared it in the link the code snippet we used. But will share again.

`MSNotificationHub.setDelegate(self) MSNotificationHub.setLifecycleDelegate(self)

    let hubOptions = MSNotificationHubOptions(withOptions: [.alert, .badge, .sound])

    // Start SDK which internally register for notifications.
    //This will call registerfornotification in delegate with token.
    //We will register to BFF from call to the method
    MSNotificationHub.start(connectionString: connectionString, hubName: hubName, options: hubOptions!)

MSNotificationHub.didRegisterForRemoteNotifications(withDeviceToken: token)`

This is code snippet we have used for registering token.

Please get back to me for clairifications.

Thanks, Shravana

TPavanBalaji commented 4 months ago

@shravankumarbj Thank you for bringing this to our attention. I've delegated this to content author, who will review it and offer their insightful opinions.