---
title: "synchronousRemoteObjectProxyWithErrorHandler(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsxpcconnection/synchronousremoteobjectproxywitherrorhandler(_:)"
---

# synchronousRemoteObjectProxyWithErrorHandler(_:)

Returns a proxy that makes a synchronous IPC call instead of the default async behavior.

## Declaration

```swift
func synchronousRemoteObjectProxyWithErrorHandler(_ handler: @escaping (any Error) -> Void) -> Any
```

## Discussion

Discussion The error handler block and reply block will be invoked on the calling thread before the message to the proxy returns, instead of on the queue for the connection.

## See Also

### Working with proxy objects

- [remoteObjectProxyWithErrorHandler(_:)](foundation/nsxpcconnection/remoteobjectproxywitherrorhandler(_:).md)
