Badge notification permanently set to 100. Please help

Hello Everyone,

First off, I am sorry if this is the wrong section to post my development question. I am new to the forums. I have a weird issue with my app that I am creating. I am making a reminders app and while testing out notifications (alerts, badge, sound, etc) I set the badge number = 100 because I wasn’t noticing any changes to the badge. Once I saw that it set to 100 I removed the code and added this code:

if let badge = badge { var currentBadgeCount = UIApplication.shared.applicationIconBadgeNumber currentBadgeCount += badge notificationContent.badge = NSNumber(integerLiteral: currentBadgeCount) }

but for some reason, regardless of any notifications/reminders being inside my app the badge number always reflects 100. I’ve included some screenshots to show my app delegate code.

What did I do wrong?

Bump. Does anyone have any ideas?

The reason you haven’t gotten a response is that your question is very specific to Apple frameworks and hence kinda off topic for Swift Forums. My advice is that you bounce over to Apple Developer Forums and ask there. As the question is tied to both UIKit and the UserNotifications framework, I recommend that you apply those two tags.

Good luck!

Share and Enjoy

Quinn “The Eskimo!” @ DTS @ Apple

I appreciate the starting point. I am very new to iOS development. Thanks!

Terms of Service

Privacy Policy

Cookie Policy