Azure / azure-notificationhubs-dotnet

.NET SDK for Azure Notification Hubs
MIT License
70 stars 119 forks source link

[BUG] NotificationHubClient.GetRegistrationsByChannelAsync not returning any result on IOS #295

Open aiemsal opened 10 months ago

aiemsal commented 10 months ago

Hello, I'm trying to use the notificationHub in order to receive notifications on my IOS device. The problem is that when I try to check whether my device is already registered or not, I'm using NotificationHubClient.GetRegistrationsByChannelAsync() but it returns 0 results. I checked with a console program and it successfully returns two registrations in my case.

I registered my client with NotificationHubClient.CreateClientFromConnectionString with the right NotificationHubConnectionString and NotificationHubNamespace. To reproduce this you only have to call GetRegistrationsByChannelAsync(_deviceToken, 100) on an IOS device in a Xamarin/maui environment.

It is supposed to return my registration in order to not register again or cleanup the potential duplicates.

Setup (please complete the following information):