---
title: LSRolesMask
framework: coreservices
role: symbol
role_heading: Structure
path: coreservices/lsrolesmask
---

# LSRolesMask

The specification that sets the desired role or roles for an app to claim for an item or a family of items.

## Declaration

```swift
struct LSRolesMask
```

## Overview

Overview This bit mask is passed to functions that find the preferred app for an item or family of items (LSGetApplicationForItem, LSGetApplicationForURL, LSGetApplicationForInfo), or that determine whether an app can open a designated item (LSCanRefAcceptItem, LSCanURLAcceptURL), to specify the app’s desired role or roles for the item. For example, to request only an editor app, specify kLSRolesEditor. If either an editor or a viewer app is acceptable, specify kLSRolesEditor | kLSRolesViewer.

## Topics

### Constants

- [none](coreservices/lsrolesmask/1442696-none.md)
- [viewer](coreservices/lsrolesmask/1441708-viewer.md)
- [editor](coreservices/lsrolesmask/1448087-editor.md)
- [shell](coreservices/lsrolesmask/1442557-shell.md)
- [all](coreservices/lsrolesmask/1450616-all.md)

### Creating a Roles Mask

- [init(rawValue:)](coreservices/lsrolesmask/1445983-init.md)

## Relationships

### Conforms To

- [OptionSet](swift/optionset.md)
- [Sendable](swift/sendable.md)

## See Also

### Working with Role Handlers

- [LSCopyAllRoleHandlersForContentType(_:_:)](coreservices/1448020-lscopyallrolehandlersforcontentt.md)
- [LSCopyDefaultRoleHandlerForContentType(_:_:)](coreservices/1449868-lscopydefaultrolehandlerforconte.md)
- [LSSetDefaultRoleHandlerForContentType(_:_:_:)](coreservices/1444955-lssetdefaultrolehandlerforconten.md)
- [LSSetDefaultHandlerForURLScheme(_:_:)](coreservices/1447760-lssetdefaulthandlerforurlscheme.md)
