My App sets up multiple local notifications via a loop based on a calendar date and time (calendar trigger). While everything else is working correctly with this, I cannot seem to get the badge number to increment properly. I tried setting this up via content.badge but what happens is...
User gets notification 1,2,3,4,5 and badge number gets set to 5 content.badge = self.counter
User then "clears" notifications 2 and 3 -> and badge number is now 3 via my code (UIApplication.shared.applicationIconBadgeNumber - 1)
When the next notification (number 6) pops up, the badge number SHOULD show 4. It doesn't. It shows 6 because that's what was set via content.badge