<!--
{
  "availability" : [
    "macOS: 10.13.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSApplicationDelegate/application(_:open:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSApplicationDelegate(im)application:openURLs:"
  },
  "title" : "application(_:open:)"
}
-->

# application(_:open:)

Tells the delegate to open the resource at the specified URL.

```
@MainActor optional func application(_ application: NSApplication, open urls: [URL])
```

## Parameters

`application`

Your singleton app object.

`urls`

An array of URLs to open. The list does not include URLs for which your app has a defined document type.

## Discussion

AppKit calls this method when your app is asked to open one or more URL-based resources. You must declare the URL types that your app supports in your `Info.plist` file using the `CFBundleURLTypes` key. The list can also include URLs for documents for which your app does not have an associated [`NSDocument`](/documentation/AppKit/NSDocument) class. You configure document types using Xcode, or by adding the `CFBundleDocumentTypes` key to your `Info.plist` file.

If your delegate implements this method, AppKit does not call the [`application(_:openFile:)`](/documentation/AppKit/NSApplicationDelegate/application(_:openFile:)) or [`application(_:openFiles:)`](/documentation/AppKit/NSApplicationDelegate/application(_:openFiles:)) methods.

---

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)