<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "XPC",
  "identifier" : "/documentation/XPC/XPCPeerRequirement/entitlement(_:matches:)-2bray",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "XPC"
    ],
    "preciseIdentifier" : "s:3XPC18XPCPeerRequirementV11entitlement_7matchesACSS_SStFZ"
  },
  "title" : "entitlement(_:matches:)"
}
-->

# entitlement(_:matches:)

Create a requirement that the peer has the specified entitlement with the matching string value

```
static func entitlement(_ entitlement: String, matches value: String) -> XPCPeerRequirement
```

## Return Value

A `XPCPeerRequirement` object representing the requirement

## Discussion

- entitlement: The entitlement to check.
- value: The string value to match

---

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)