<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.2.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NetServiceDelegate/netServiceDidResolveAddress(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(pl)NSNetServiceDelegate(im)netServiceDidResolveAddress:"
  },
  "title" : "netServiceDidResolveAddress(_:)"
}
-->

# netServiceDidResolveAddress(_:)

Informs the delegate that the address for a given service was resolved.

```
optional func netServiceDidResolveAddress(_ sender: NetService)
```

## Parameters

`sender`

The service that was resolved.

## Discussion

The delegate can use the [`addresses`](/documentation/Foundation/NetService/addresses) method to retrieve the service’s address. If the delegate needs only one address, it can stop the resolution process using [`stop()`](/documentation/Foundation/NetService/stop()). Otherwise, the resolution will continue until the timeout specified in [`resolve(withTimeout:)`](/documentation/Foundation/NetService/resolve(withTimeout:)) is reached.

## See Also

[`addresses`](/documentation/Foundation/NetService/addresses)

A read-only array containing `NSData` objects, each of which contains a socket address for the service.



---

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)