---
title: NSSavePanel
framework: appkit
role: symbol
role_heading: Class
path: appkit/nssavepanel
---

# NSSavePanel

A panel that prompts the user for information about where to save a file.

## Declaration

```swift
@MainActor class NSSavePanel
```

## Overview

Overview The Save panel provides an interface for specifying the location to save a file and the name of that file. You present this panel when the user attempts to save a new document, or when the user saves a copy of an existing document to a new location. The panel includes UI for browsing the file system, selecting a directory, and specifying the new name for the file. You can also add custom UI for your app using an accessory view. An NSSavePanel object reports user interactions to its associated delegate object, which must adopt the NSOpenSavePanelDelegate protocol. Use your delegate object to validate the user’s selection and respond to user interactions with the panel. In macOS 10.15, the system always displays the Save dialog in a separate process, regardless of whether the app is sandboxed. When the user saves the document, macOS adds the saved file to the app’s sandbox (if necessary) so that the app can write to the file. Prior to macOS 10.15, the system used a separate process only for sandboxed apps.

## Topics

### Responding to User Interactions

- [delegate](appkit/nssavepanel/delegate.md)
- [NSOpenSavePanelDelegate](appkit/nsopensavepaneldelegate.md)

### Showing the Panel

- [beginSheetModal(for:completionHandler:)](appkit/nssavepanel/beginsheetmodal(for:completionhandler:).md)
- [begin(completionHandler:)](appkit/nssavepanel/begin(completionhandler:).md)
- [runModal()](appkit/nssavepanel/runmodal().md)
- [validateVisibleColumns()](appkit/nssavepanel/validatevisiblecolumns().md)

### Getting the Selected Item

- [url](appkit/nssavepanel/url.md)

### Configuring the Panel’s Appearance

- [title](appkit/nssavepanel/title.md)
- [prompt](appkit/nssavepanel/prompt.md)
- [message](appkit/nssavepanel/message.md)
- [nameFieldLabel](appkit/nssavepanel/namefieldlabel.md)
- [nameFieldStringValue](appkit/nssavepanel/namefieldstringvalue.md)
- [directoryURL](appkit/nssavepanel/directoryurl.md)
- [accessoryView](appkit/nssavepanel/accessoryview.md)
- [showsTagField](appkit/nssavepanel/showstagfield.md)
- [tagNames](appkit/nssavepanel/tagnames.md)

### Configuring the Panel’s Behavior

- [canCreateDirectories](appkit/nssavepanel/cancreatedirectories.md)
- [canSelectHiddenExtension](appkit/nssavepanel/canselecthiddenextension.md)
- [showsHiddenFiles](appkit/nssavepanel/showshiddenfiles.md)
- [isExtensionHidden](appkit/nssavepanel/isextensionhidden.md)
- [isExpanded](appkit/nssavepanel/isexpanded.md)
- [Button tags](appkit/button-tags.md)

### Configuring the File Types

- [allowedContentTypes](appkit/nssavepanel/allowedcontenttypes.md)
- [allowsOtherFileTypes](appkit/nssavepanel/allowsotherfiletypes.md)
- [treatsFilePackagesAsDirectories](appkit/nssavepanel/treatsfilepackagesasdirectories.md)

### Handling Actions

- [ok(_:)](appkit/nssavepanel/ok(_:).md)
- [cancel(_:)](appkit/nssavepanel/cancel(_:).md)

### Deprecated

- [Deprecated Symbols](appkit/nssavepanel-deprecated-symbols.md)

### Instance Properties

- [identifier](appkit/nssavepanel/identifier.md)
- [currentContentType](appkit/nssavepanel/currentcontenttype.md)
- [showsContentTypes](appkit/nssavepanel/showscontenttypes.md)

## Relationships

### Inherits From

- [NSPanel](appkit/nspanel.md)

### Inherited By

- [NSOpenPanel](appkit/nsopenpanel.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSAccessibilityElementProtocol](appkit/nsaccessibilityelementprotocol.md)
- [NSAccessibilityProtocol](appkit/nsaccessibilityprotocol.md)
- [NSAnimatablePropertyContainer](appkit/nsanimatablepropertycontainer.md)
- [NSAppearanceCustomization](appkit/nsappearancecustomization.md)
- [NSCoding](foundation/nscoding.md)
- [NSMenuItemValidation](appkit/nsmenuitemvalidation.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSStandardKeyBindingResponding](appkit/nsstandardkeybindingresponding.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [NSUserActivityRestoring](appkit/nsuseractivityrestoring.md)
- [NSUserInterfaceItemIdentification](appkit/nsuserinterfaceitemidentification.md)
- [NSUserInterfaceValidations](appkit/nsuserinterfacevalidations.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Open and Save Panels

- [NSOpenPanel](appkit/nsopenpanel.md)
- [NSOpenSavePanelDelegate](appkit/nsopensavepaneldelegate.md)
