Toasts.Forms.Plugin icon indicating copy to clipboard operation
Toasts.Forms.Plugin copied to clipboard

Setting badge count on iOS causes notifications to stop

Open ozzy1873 opened this issue 7 years ago • 0 comments

Setting badge count on iOS causes notifications to stop. I can reproduce this quickly with the following steps:

  1. Restart the phone
  2. Run the app then put it in background
  3. Send some notifications that increment the badge count. Note that the notification is displayed and the badge count increments as expected.
  4. Open the app and send some more notifications, but do not increment the badge count by leaving iOSOptions null. Note that notifications are displayed as expected.
  5. Background the app and send some more notifications. Note that notifications no longer appear and the badge is not incremented.
  6. Open the app and one previously sent notification will appear.
  7. If this does not repro the first time, repeat starting with Step 2.

This error state will remain until the phone is restarted. Force quitting the app does not clear the error state. My app sets UIApplication.SharedApplication.ApplicationIconBadgeNumber=0 in AppDelegate.OnActivated. Also, the notification I am sending does not set the "alert" field and sets content-available =1.

More info: Once in the error state, if I leave the app in the background after Step 5 for about 7 minutes, one notification will display and increment the badge count. Send another notification at this point and it will not display for another 7 minutes.

ozzy1873 avatar Feb 15 '18 07:02 ozzy1873