---
title: "runModal(forIdentities:message:)"
framework: securityinterface
role: symbol
role_heading: Instance Method
path: "securityinterface/sfchooseidentitypanel/runmodal(foridentities:message:)"
---

# runModal(forIdentities:message:)

Displays a list of identities in a modal panel.

## Declaration

```swift
func runModal(forIdentities identities: [Any]!, message: String!) -> Int
```

## Parameters

- `identities`: An array of identity objects (objects of type doc://com.apple.documentation/documentation/Security/SecIdentity. Use the doc://com.apple.documentation/documentation/Security/SecIdentitySearchCopyNext function (in Security/SecIdentitySearch.h) to find identity objects.
- `message`: A message string to display in the panel.

## Discussion

Discussion This method returns NSOKButton if the default button is clicked, or NSCancelButton if the alternate button is clicked. Use the identity() method to obtain the identity chosen by the user.

## See Also

### Related Documentation

- [identity()](securityinterface/sfchooseidentitypanel/identity().md)

### Displaying a Sheet or Panel

- [beginSheet(for:modalDelegate:didEnd:contextInfo:identities:message:)](securityinterface/sfchooseidentitypanel/beginsheet(for:modaldelegate:didend:contextinfo:identities:message:).md)
