I'm having a problem with my badge incrementation. I'm using the CloudKit push notifications, and when my app receives a push notification, it increments up from the last notification number.
So even when I reset it to zero using:
UIApplication.sharedApplication().applicationIconBadgeNumber = 0
...in the AppDelegate.swift method, it will start from a higher number like 15 - not 1.
I should mention that my app can receive push notifications. When the above code is triggered, the badges go away (as if the badge counter were reset to 0), but this is temporary.
This has been driving me nuts. Can someone out there help me?