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

# urlForApplication(toOpen:)

Returns the URL to the default app to open the specified content type.

```
func urlForApplication(toOpen contentType: UTType) -> URL?
```

## Parameters

`contentType`

The content type to open.

## Return Value

The URL of the default app that opens the specified `contentType`. Returns `nil` if no app can open the content type.

---

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)