---
title: current()
framework: foundation
role: symbol
role_heading: Type Method
path: foundation/nsxpcconnection/current()
---

# current()

Returns the current connection, in the context of a call to a method on your exported object.

## Declaration

```swift
class func current() -> NSXPCConnection?
```

## Return Value

Return Value An NSXPCConnection object, representing a connection to another process.

## Discussion

Discussion Use this method to determine what process invoked the current call.

## See Also

### Managing connection state

- [activate()](foundation/nsxpcconnection/activate().md)
- [resume()](foundation/nsxpcconnection/resume().md)
- [invalidate()](foundation/nsxpcconnection/invalidate().md)
- [suspend()](foundation/nsxpcconnection/suspend().md)
- [interruptionHandler](foundation/nsxpcconnection/interruptionhandler.md)
- [invalidationHandler](foundation/nsxpcconnection/invalidationhandler.md)
- [scheduleSendBarrierBlock(_:)](foundation/nsxpcconnection/schedulesendbarrierblock(_:).md)
