<!--
{
  "availability" : [
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FinderSync",
  "identifier" : "/documentation/FinderSync/FIFinderSyncProtocol/requestBadgeIdentifier(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Finder Sync"
    ],
    "preciseIdentifier" : "c:objc(pl)FIFinderSync(im)requestBadgeIdentifierForURL:"
  },
  "title" : "requestBadgeIdentifier(for:)"
}
-->

# requestBadgeIdentifier(for:)

Requests a badge for the given file or directory.

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

## Parameters

`url`

The URL of a file or directory inside the extension’s monitored
directories.

## 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:)`](/documentation/FinderSync/FIFinderSyncController/setBadgeIdentifier(_:for:)) to set an appropriate
badge.

## See Also

[`setBadgeIdentifier(_:for:)`](/documentation/FinderSync/FIFinderSyncController/setBadgeIdentifier(_:for:))

Sets the badge for a file or directory.



---

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)