Updating iOS badge without push notifications
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
You can update an iOS app badge without remote push notifications, but only when the app has a chance to run code. That distinction matters: iOS lets your app set or clear its badge locally, yet it does not let a server change the badge on a dormant app unless the device receives a push or some other allowed background execution path occurs.
What "Without Push" Really Means on iOS
There are two separate questions developers often mix together:
- can the app change its own badge without APNs?
- can the badge reflect server-side changes while the app is not running and without APNs?
The answer to the first is yes. The answer to the second is usually no.
If the app is in the foreground, has just launched, receives background app refresh time, or is scheduling a local notification, it can update the badge count. If the app is fully suspended with no execution opportunity, it cannot wake itself just to change the icon badge.
Update the Badge While the App Is Running
If the badge number comes from local state or from data fetched while the app is active, you can set it directly.
This is the simplest path when the app is open or just came back to the foreground and you have already computed the current unread count.
Request Badge Permission First
Even for local badge changes, the app should request notification authorization that includes badge permission.
If the user denies notification permissions, the badge behavior may not work the way you expect. Do not assume the app can always display or update the badge just because the code compiles.
Use Local Notifications for Scheduled Badge Changes
If you know ahead of time that the badge should change at a specific time, a local notification can carry the badge update.
This still avoids APNs because the notification is created entirely on the device. It works well for reminders, countdowns, or other badge values derived from local knowledge.
Sync in the Background When iOS Allows It
If the badge depends on server data, the app can refresh it during legitimate background execution windows such as background app refresh. The app does not control exactly when iOS grants that time, so this is not a real-time substitute for push notifications.
A common pattern is:
- app gets a background refresh opportunity
- fetch unread count from the server
- update the local badge number
That gives occasional freshness, not immediate delivery. If you need the badge to reflect server changes promptly while the app is inactive, remote push remains the normal iOS mechanism.
Reset the Badge Intentionally
Badges should not accumulate stale values forever. Reset them when the user has consumed the relevant information.
A badge is only useful if users trust it. If it lingers after they have already read the messages or completed the tasks, it stops being meaningful.
Common Pitfalls
The biggest mistake is expecting a server-side change to update the badge on a suspended app without APNs. On iOS, no local code is running at that point, so there is nothing to perform the update.
Another mistake is forgetting badge permission. Developers often test on devices where permission was previously granted and then assume badge updates always work.
People also sometimes treat background refresh as if it were immediate. It is not. iOS decides when to grant background time, and the schedule can be infrequent.
Finally, do not forget to clear or recompute badge values when users open the app. Stale badges are worse than missing badges because they train users to ignore them.
Summary
- iOS apps can update their own badges without remote push notifications when they have execution time.
- Local notifications and foreground code are the main non-APNs ways to set badge values.
- Background refresh can update badges from server data, but not in real time.
- A suspended app cannot arbitrarily wake itself just to change the icon badge.
- Request badge permission and clear stale badge counts deliberately.

