thudugala / Plugin.LocalNotification

The local notification plugin provides a way to show local notifications from .Net MAUI and Xamarin Forms apps .
MIT License
419 stars 68 forks source link

Time Sensitive Notifications on iOS not working #336

Closed DeerSteak closed 1 year ago

DeerSteak commented 1 year ago

Describe the bug The notifications in this app use the iOSPriority.TimeSensitive option. I have set up an App ID on the Apple Developer portal with Time Sensitive notifications and generated new mobileprovision files with the entitlement. When I install the app on a real device and choose Announce Notifications, the settings screen says the app does not mark notifications as time sensitive. The UNAuthorizationOptions.TimeSensitive and .Announcement have been deprecated in favor of the entitlement with iOS 16. Apple's example in Swift has not been updated since iOS 15 WWDC 2021.

To Reproduce Steps to reproduce the behavior:

  1. Update the geofences in MainViewModel to have your own location, so that notifications get generated for where you are.
  2. Run project on actual device running iOS 16 or later.
  3. Give permission. Wait about 10 seconds and a test notification appears
  4. Go to Settings > MyTest > Notifications > Announce. Turn on Announce Notifications
  5. See note that the app does not mark notifications as time sensitive so you might get too many. No Time Sensitive option in Settings.
  6. Drive around and get a notification, but no Time Sensitive indicator on the notification.

Expected behavior I expected to see a Time Sensitive toggle and for notifications to say they are time sensitive.

Screenshots Screenshot 2022-12-01 at 2 05 56 PM IMG_0274 IMG_0273 IMG_0272

Platform (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

DeerSteak commented 1 year ago

Test project here:

MyTest.zip

DeerSteak commented 1 year ago

I don't think this is a Plugin.LocalNotification problem. I rewrite my sample using UNNotificationCenter natively and it doesn't have time sensitive notifications either.