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

# selectedItemURLs()

Returns an array of selected items.

```
func selectedItemURLs() -> [URL]?
```

## Return Value

An array of items currently selected in the Finder window.

## Discussion

Use this method when creating a shortcut menu or a menu for the extension’s
toolbar button. You can then modify the menu’s content based on the items
currently selected.

This method returns valid values only from the Finder Sync extension’s
[`menu(for:)`](/documentation/FinderSync/FIFinderSyncProtocol/menu(for:)) method or from one of the menu
actions created in this method. If the selected items are outside the
extension’s managed directories (for example, when the user clicks on the
toolbar button), this method returns `nil`.

---

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)