---
title: "subscript(_:)"
framework: xpc
role: symbol
role_heading: Instance Subscript
path: "xpc/xpcdictionary/subscript(_:)-2p7tp"
---

# subscript(_:)

Get or set an XPCEndpoint value in this dictionary.

## Declaration

```swift
subscript(key: String) -> XPCEndpoint? { get set }
```

## Parameters

- `key`: The key under which to get the xpc endpoint.

## Return Value

Return Value A previously-set endpoint value. If no endpoint was previously set for key, returns nil.
