<!--
{
  "availability" : [
    "macOS: 10.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SecurityInterface",
  "identifier" : "/documentation/SecurityInterface/SFKeychainSettingsPanel/runModal(for:keychain:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Security Interface"
    ],
    "preciseIdentifier" : "c:objc(cs)SFKeychainSettingsPanel(im)runModalForSettings:keychain:"
  },
  "title" : "runModal(for:keychain:)"
}
-->

# runModal(for:keychain:)

Displays a panel that allows users to change keychain settings.

```
func runModal(for settings: UnsafeMutablePointer<SecKeychainSettings>!, keychain: SecKeychain!) -> Int
```

## Parameters

`settings`

A pointer to a keychain settngs structure. Because this structure is versioned, you must preallocate it and fill in the version of the structure.

`keychain`

The keychain whose settings you wish to have the user change.

## Discussion

The method result indicates which button the user clicks: <doc://com.apple.documentation/documentation/AppKit/NSOKButton> or <doc://com.apple.documentation/documentation/AppKit/NSCancelButton> .

If the user attempts to chanage the settings of a locked keychain, the unlock authorization dialog appears.

---

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)