---
title: "setBadgeImage(_:label:forBadgeIdentifier:)"
framework: Finder Sync
role: symbol
role_heading: Instance Method
platforms: [macOS 10.10+]
path: "findersync/fifindersynccontroller/setbadgeimage(_:label:forbadgeidentifier:)"
---

# setBadgeImage(_:label:forBadgeIdentifier:)

Sets the badge image and label for the given ID.

## Declaration

```swift
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

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.

## See Also

### Managing the Finder Sync Controller

- [default()](findersync/fifindersynccontroller/default().md)
- [directoryURLs](findersync/fifindersynccontroller/directoryurls.md)
- [selectedItemURLs()](findersync/fifindersynccontroller/selecteditemurls().md)
- [setBadgeIdentifier(_:for:)](findersync/fifindersynccontroller/setbadgeidentifier(_:for:).md)
- [targetedURL()](findersync/fifindersynccontroller/targetedurl().md)
