<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Collaboration",
  "identifier" : "/documentation/Collaboration/CBIdentityPicker/runModal(for:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Collaboration"
    ],
    "preciseIdentifier" : "c:objc(cs)CBIdentityPicker(im)runModalForWindow:completionHandler:"
  },
  "title" : "runModal(for:completionHandler:)"
}
-->

# runModal(for:completionHandler:)

Runs the identity picker modally as a sheet attached to a specified window.

```
func runModal(for window: NSWindow, completionHandler: (@Sendable (NSApplication.ModalResponse) -> Void)? = nil)
```

## Parameters

`window`

The parent window for the sheet.

`completionHandler`

The handler to run after the return value is known, but before the sheet is 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)