<!--
{
  "availability" : [
    "macCatalyst: 13.1.0 - 13.1.0",
    "macOS: 10.0.0 - 10.13.0"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSConnection/rootProxyForConnectionWithRegisteredName:host:usingNameServer:",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSConnection(cm)rootProxyForConnectionWithRegisteredName:host:usingNameServer:"
  },
  "title" : "rootProxyForConnectionWithRegisteredName:host:usingNameServer:"
}
-->

# rootProxyForConnectionWithRegisteredName:host:usingNameServer:

Returns a proxy for the root object of the `NSConnection` object registered with `server` under `name` on a given host.

```
+ (NSDistantObject *) rootProxyForConnectionWithRegisteredName:(NSString *) name host:(NSString *) hostName usingNameServer:(NSPortNameServer *) server;
```

## Parameters

`name`

The name of an `NSConnection` object .

`hostName`

A host name.

`server`

The server.

## Return Value

A proxy for the root object of the `NSConnection` object registered with `server` under `name` on the host named `hostName`, or `nil` if that `NSConnection` object has no root object set.

## Discussion

See [`rootProxyForConnectionWithRegisteredName:host:`](/documentation/Foundation/NSConnection/rootProxyForConnectionWithRegisteredName:host:) for more information.

---

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)