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

# runModal(for:showGroup:)

Displays a certificate chain in a modal panel.

```
func runModal(for trust: SecTrust!, showGroup: Bool) -> Int
```

## Parameters

`trust`

A <doc://com.apple.documentation/documentation/Security/SecTrust> object associated with the certificate chain to display.

`showGroup`

Specifies whether additional certificates (other than the leaf certificate) are displayed. To show only a single certificate, specify only one <doc://com.apple.documentation/documentation/Security/SecCertificate> in the array and set `showGroup` to <doc://com.apple.documentation/documentation/Swift/false>.

## Return Value

This method returns the integer constant <doc://com.apple.documentation/documentation/AppKit/NSOKButton> when dismissed.

---

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)