---
title: anonymous()
framework: foundation
role: symbol
role_heading: Type Method
path: foundation/nsxpclistener/anonymous()
---

# anonymous()

Returns a new anonymous listener connection.

## Declaration

```swift
class func anonymous() -> NSXPCListener
```

## Discussion

Discussion Other processes can connect to this listener by passing this listener object’s NSXPCListenerEndpoint to the init(listenerEndpoint:) method of an NSXPCConnection object.

## See Also

### Using standard listeners

- [service()](foundation/nsxpclistener/service().md)
