<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSOpenPanel",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSOpenPanel"
  },
  "title" : "NSOpenPanel"
}
-->

# NSOpenPanel

A panel that prompts the user to select a file to open.

```
class NSOpenPanel
```

## Overview

Apps use the Open panel as a convenient way to query the user for the name of a file to open. In macOS 10.15 and later, the system always draws Open panels in a separate process, regardless of whether the app is sandboxed. When the user chooses a file to open, macOS adds that file to the app’s sandbox. Prior to macOS 10.15, the system drew the panels in a separate process only for sandboxed apps.

## Topics

### Creating an Open Panel

[`+  openPanel`](/documentation/AppKit/NSOpenPanel/openPanel)

Creates a new Open panel and initializes it with a default configuration.

### Configuring the Open Panel

[`canChooseFiles`](/documentation/AppKit/NSOpenPanel/canChooseFiles)

A Boolean that indicates whether the user can choose files in the panel.

[`canChooseDirectories`](/documentation/AppKit/NSOpenPanel/canChooseDirectories)

A Boolean that indicates whether the user can choose directories in the panel.

[`resolvesAliases`](/documentation/AppKit/NSOpenPanel/resolvesAliases)

A Boolean that indicates whether the panel resolves aliases.

[`allowsMultipleSelection`](/documentation/AppKit/NSOpenPanel/allowsMultipleSelection)

A Boolean that indicates whether the user may select multiple files and directories.

[`accessoryViewDisclosed`](/documentation/AppKit/NSOpenPanel/isAccessoryViewDisclosed)

A Boolean value that indicates whether the panel’s accessory view is visible.

### Accessing User Selection

[`URLs`](/documentation/AppKit/NSOpenPanel/urls)

An array of URLs, each of which contains the fully specified location of a selected file or directory.

### Supporting iCloud Documents

[`canDownloadUbiquitousContents`](/documentation/AppKit/NSOpenPanel/canDownloadUbiquitousContents)

A Boolean value that indicates how the panel responds to iCloud documents that aren’t fully downloaded locally.

[`canResolveUbiquitousConflicts`](/documentation/AppKit/NSOpenPanel/canResolveUbiquitousConflicts)

A Boolean value that indicates how the panel responds to iCloud documents that have conflicting versions.

### Deprecated

Avoid using deprecated classes and protocols in your apps.

[Deprecated Symbols](/documentation/AppKit/nsopenpanel-deprecated-symbols)

Review symbols that are no longer supported, and find the replacements to use instead.

## Relationships

### Conforms To

[`NSUserActivityRestoring`](/documentation/AppKit/NSUserActivityRestoring)

[`NSAccessibilityElementProtocol`](/documentation/AppKit/NSAccessibilityElementProtocol)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`NSUserInterfaceValidations`](/documentation/AppKit/NSUserInterfaceValidations)

[`NSAppearanceCustomization`](/documentation/AppKit/NSAppearanceCustomization)

[`NSMenuItemValidation`](/documentation/AppKit/NSMenuItemValidation)

[`NSAccessibilityProtocol`](/documentation/AppKit/NSAccessibilityProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSAnimatablePropertyContainer`](/documentation/AppKit/NSAnimatablePropertyContainer)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSStandardKeyBindingResponding`](/documentation/AppKit/NSStandardKeyBindingResponding)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSUserInterfaceItemIdentification`](/documentation/AppKit/NSUserInterfaceItemIdentification)

### Inherits From

[`NSSavePanel`](/documentation/AppKit/NSSavePanel)

---

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)