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

# SFKeychainSavePanel

A panel or sheet that allows the user to create a keychain.

```
class SFKeychainSavePanel
```

## Overview

The following figure shows an example of a keychain save panel.

![Keychain save panel](images/com.apple.securityinterface/media-1965598.gif)

## Topics

### Returning a Shared Keychain Save Panel Object

[`+  sharedKeychainSavePanel`](/documentation/SecurityInterface/SFKeychainSavePanel/shared())

Returns a shared keychain save panel object.

### Displaying a Sheet or Panel

[`-  setPassword:`](/documentation/SecurityInterface/SFKeychainSavePanel/setPassword(_:))

Specifies the password for the keychain that will be created.

[`-  beginSheetForDirectory:file:modalForWindow:modalDelegate:didEndSelector:contextInfo:`](/documentation/SecurityInterface/SFKeychainSavePanel/beginSheet(forDirectory:file:modalFor:modalDelegate:didEnd:contextInfo:))

Displays a sheet that allows a user to create a new keychain.

[`-  runModalForDirectory:file:`](/documentation/SecurityInterface/SFKeychainSavePanel/runModal(forDirectory:file:))

Displays a panel that allows a user to create a new keychain.

### Returning Information from the Sheet or Panel

[`-  error`](/documentation/SecurityInterface/SFKeychainSavePanel/error())

Returns the last error encountered by the keychain save panel.

[`-  keychain`](/documentation/SecurityInterface/SFKeychainSavePanel/keychain())

Returns the keychain created by the keychain save panel.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

### 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)