Founding sponsorYour name here
3

The red count bubble is the Dock badge; the hop is a dock bounce

Dock Badge

/ NSDockTile.badgeLabel · NSApplication.dockTile /

also called Dock tile badge, app icon badge, notification badge

A Dock badge is the small red label overlaid on an application's Dock icon, usually showing an unread or pending count. The label belongs to the app's NSDockTile and can also contain short status text. Requesting user attention makes the Dock icon bounce and is a separate, more interruptive signal that should be used sparingly.

If you called it…

the red number bubble on a dock iconunread count on the app icon in the docklittle red label in the corner of a mac app iconnumber badge showing pending notificationsthe red dot or number on a dock icon

…you meant a dock badge.

Anatomy — every part, named

  1. 1
    Badge labelNSDockTile.badgeLabel

    “The red number bubble on the app icon” is the Dock tile's badge label.

  2. 2
    Attention bounceNSApplication.requestUserAttention(_:)

    “The app icon jumping in the Dock” is an attention bounce, not part of the badge.

Prompt — paste into your agent

Show a Dock Badge by assigning the count to NSApp.dockTile.badgeLabel, clearing the label when no count remains. If stronger attention is warranted, call NSApplication.requestUserAttention(_:) separately to bounce the Dock icon; the bounce is not the badge itself.

Debug prompt — when it misbehaves

Paste this, then describe what you’re seeing — it hands your agent the classic failure modes to rule out first.

Debug my macOS Dock badge (NSDockTile.badgeLabel, NSApp.dockTile). Rule out: clearing with the string zero instead of nil or empty so a 0 stays visible; setting the badge from a background thread; expecting the badge to survive quit — it lives only while the app runs (UNUserNotificationCenter badge APIs persist); long strings truncating in the tile. The symptom:

In code

The exact names this thing goes by in code — each row is one framework’s word for it. Use the row that matches your project (or paste it into your prompt).

AppKitNSDockTile.badgeLabel
AppKitNSApplication.dockTile
AppKitNSApplication.requestUserAttention(_:)bounces the Dock icon; separate from the badge
AppKitNSApplication.RequestUserAttentionType

See also

Search

Describe the UI element you're thinking of