EgorBo / EgorBo/Toasts.Forms.Plugin

Setting badge count on iOS causes notifications to stop

Open
#154 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
275
Forks
81
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.