<!--
{
  "availability" : [
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FinderSync",
  "identifier" : "/documentation/FinderSync/FIFinderSyncController/setBadgeImage(_:label:forBadgeIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Finder Sync"
    ],
    "preciseIdentifier" : "c:objc(cs)FIFinderSyncController(im)setBadgeImage:label:forBadgeIdentifier:"
  },
  "title" : "setBadgeImage(_:label:forBadgeIdentifier:)"
}
-->

# setBadgeImage(_:label:forBadgeIdentifier:)

Sets the badge image and label for the given ID.

```
func setBadgeImage(_ image: NSImage, label: String?, forBadgeIdentifier badgeID: String)
```

## Parameters

`image`

An <doc://com.apple.documentation/documentation/AppKit/NSImage>
object. The system may or may not draw this image on top of the item’s
icon; when it does, the system determines the overlay position. Don’t
add any padding to the image to adjust this positioning. The image draws
at up to 320 x 320 points.

`label`

A label describing the sync state represented by this badge.
Each label should be a short localized string, such as “Waiting.”

`badgeID`

A unique ID, identifying this badge.

## Discussion

Use this method to configure your badges. Finder may display the image, the
label or both. Your Finder Sync extension typically sets up a fixed number
of badges during its `init` method.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)