---
title: "hasEntitlement(_:)"
framework: xpc
role: symbol
role_heading: Type Method
path: "xpc/xpcpeerrequirement/hasentitlement(_:)"
---

# hasEntitlement(_:)

Create a requirement that the peer has the specified entitlement

## Declaration

```swift
static func hasEntitlement(_ entitlement: String) -> XPCPeerRequirement
```

## Return Value

Return Value A XPCPeerRequirement object representing the requirement

## Discussion

Discussion entitlement: The entitlement to check.
