---
title: "urlForApplication(toOpen:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsworkspace/urlforapplication(toopen:)-95cvp"
---

# urlForApplication(toOpen:)

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

## Declaration

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

## Parameters

- `contentType`: The content type to open.

## Return Value

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

## See Also

### Requesting Information

- [urlForApplication(toOpen:)](appkit/nsworkspace/urlforapplication(toopen:)-7qkzf.md)
- [urlForApplication(withBundleIdentifier:)](appkit/nsworkspace/urlforapplication(withbundleidentifier:).md)
- [urlsForApplications(toOpen:)](appkit/nsworkspace/urlsforapplications(toopen:)-ualk.md)
- [urlsForApplications(toOpen:)](appkit/nsworkspace/urlsforapplications(toopen:)-60rkm.md)
- [urlsForApplications(withBundleIdentifier:)](appkit/nsworkspace/urlsforapplications(withbundleidentifier:).md)
- [getFileSystemInfo(forPath:isRemovable:isWritable:isUnmountable:description:type:)](appkit/nsworkspace/getfilesysteminfo(forpath:isremovable:iswritable:isunmountable:description:type:).md)
- [isFilePackage(atPath:)](appkit/nsworkspace/isfilepackage(atpath:).md)
- [frontmostApplication](appkit/nsworkspace/frontmostapplication.md)
- [runningApplications](appkit/nsworkspace/runningapplications.md)
- [menuBarOwningApplication](appkit/nsworkspace/menubarowningapplication.md)
- [getInfoForFile(_:application:type:)](appkit/nsworkspace/getinfoforfile(_:application:type:).md)
