Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] iOS push notifications not received to physical device from Azure #26

Open
ghost opened this issue Nov 11, 2020 · 7 comments
Open

Comments

@ghost
Copy link

ghost commented Nov 11, 2020

Describe the bug
Originally posted on stackoverflow, was recommended by a Microsoft support engineer to post here:
https://stackoverflow.com/questions/64768446/ios-push-notification-not-received-to-physical-device-from-azure

I follow this Microsoft guide rigorously but push notifications don't come through to the physical device:
https://docs.microsoft.com/en-us/azure/notification-hubs/xamarin-notification-hubs-ios-push-notification-apns-get-started

Exception or Stack Trace
RegisteredForRemoteNotifications is called successfully, but ReceivedRemoteNotification is never called when I send a Test Send from Azure. No obvious errors or exceptions come through. However, inside the .iOS project, within the method RegisteredForRemoteNotifications, I have noticed that when I hover over my SBNotificationHub instance, under the class handle it gives an error:
"Unable to cast object of type 'Mono.Debugger.Soft.PointerValue' to type 'Mono.Debugger.Soft.PrimitiveValue'."
Not sure if this has anything to do with my problem.

To Reproduce
Steps to reproduce the behavior:
On a PC with visual studio 2019 (Connected to a Mac over local network) and connect an iPhone to the Mac via lightning cable. Make sure device is connected to WIFI/phone network, create a new Xamarin project for android and iOS. Use only the code from this Microsoft guide:

https://docs.microsoft.com/en-us/azure/notification-hubs/xamarin-notification-hubs-ios-push-notification-apns-get-started.

Send a Test Send from Azure.

Expected behavior
A push notifcation should come through to the physical iPhone,

Setup (please complete the following information):

  • OS: Windows 10 PC, connected to a Mac over local network.
  • IDE : Visual Studio 2019 v16.8.0
  • Xamarin.Azure.NotificationHubs.iOS v3.1.0
  • iPhone 6s v14.1 (Connected via lightning cable)
@ghost
Copy link
Author

ghost commented Nov 11, 2020

I forgot to add, the iPhone does pop up with a permission request for push notifications, which I accept.

@pavloss
Copy link

pavloss commented Nov 16, 2020

I'm experiencing the same behaviour with a different framework. Underlying class handle also gives:
Unable to cast object of type 'Mono.Debugger.Soft.PointerValue' to type 'Mono.Debugger.Soft.PrimitiveValue'.

@c0demak3r
Copy link

I'm experiencing the exact same as shown above, following exactly the same Microsoft docs article and verbatim code. The counterpart Xamarin.Android knowledge article and Azure Notification Hub Tests work perfectly.

@nativenolde
Copy link

Is there any news about this?

@matscr
Copy link

matscr commented Jan 6, 2021

Any recent news?

@mpodwysocki
Copy link
Member

@DOPAFIEND @matscr and others, we are updating the documentation to use the latest APIs that should be merged soon MicrosoftDocs/azure-docs#68800

We are aware of the bug in the legacy APIs due to threading issues and are advising people to use the new APIs

@shaytate
Copy link

shaytate commented Mar 8, 2021

Could someone assist me with this? I am still not receiving any notification message that hits DidReceivePushNotification. I see success messages in Azure when sending. I followed the latest documentation fully. I am using the following:

Windows 10 PC, connected to a Mac over local network.
Visual Studio 2019 v16.8.6
Xamarin.Azure.NotificationHubs.iOS v3.1.1
iphone 7 v14.4 (Connected via lightning cable)
Xcode 12.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants