---
title: "requestBadgeIdentifier(for:)"
framework: Finder Sync
role: symbol
role_heading: Instance Method
platforms: [macOS 10.10+]
path: "findersync/fifindersyncprotocol/requestbadgeidentifier(for:)"
---

# requestBadgeIdentifier(for:)

Requests a badge for the given file or directory.

## Declaration

```swift
optional func requestBadgeIdentifier(for url: URL)
```

## Parameters

- `url`: The URL of a file or directory inside the extension’s monitored directories.

## Discussion

Discussion Override this method to receive notifications whenever a new item becomes visible in the Finder. Check the item’s state, and call setBadgeIdentifier(_:for:) to set an appropriate badge.

## See Also

### Related Documentation

- [setBadgeIdentifier(_:for:)](findersync/fifindersynccontroller/setbadgeidentifier(_:for:).md)

### Managing Badges, Shortcut Menus, and Toolbar Buttons

- [beginObservingDirectory(at:)](findersync/fifindersyncprotocol/beginobservingdirectory(at:).md)
- [endObservingDirectory(at:)](findersync/fifindersyncprotocol/endobservingdirectory(at:).md)
- [menu(for:)](findersync/fifindersyncprotocol/menu(for:).md)
- [toolbarItemImage](findersync/fifindersyncprotocol/toolbaritemimage.md)
- [toolbarItemName](findersync/fifindersyncprotocol/toolbaritemname.md)
- [toolbarItemToolTip](findersync/fifindersyncprotocol/toolbaritemtooltip.md)
