<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWorkspace/urlsForApplications(toOpen:)-60rkm",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWorkspace(im)URLsForApplicationsToOpenContentType:"
  },
  "title" : "urlsForApplications(toOpen:)"
}
-->

# urlsForApplications(toOpen:)

Returns an array of URLs to all available applications that can open the specified content type.

```
func urlsForApplications(toOpen contentType: UTType) -> [URL]
```

## Parameters

`contentType`

The content type to open.

## Return Value

An array of URLs to available apps that can open the specified `contentType`. Returns an empty array if no app can open the content type.

## Discussion

The system sorts the resulting array according to each app’s suitability to open the `contentType`. The returned array lists the best match first.

---

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)