---
title: runModal()
framework: Collaboration
role: symbol
role_heading: Instance Method
platforms: [macOS 10.5+]
path: collaboration/cbidentitypicker/runmodal()
---

# runModal()

Runs the receiver as an application-modal dialog.

## Declaration

```swift
func runModal() -> Int
```

## Return Value

Return Value NSOKButton if the user selected OK; otherwise,  NSCancelButton.

## Discussion

Discussion The receiver may create identities for selected records if necessary.

## See Also

### Running an Identity Picker

- [runModal(for:modalDelegate:didEnd:contextInfo:)](collaboration/cbidentitypicker/runmodal(for:modaldelegate:didend:contextinfo:).md)
- [runModal(for:completionHandler:)](collaboration/cbidentitypicker/runmodal(for:completionhandler:).md)
