<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "dnssd",
  "identifier" : "/documentation/dnssd/DNSServiceBrowseReply",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "dnssd"
    ],
    "preciseIdentifier" : "c:@T@DNSServiceBrowseReply"
  },
  "title" : "DNSServiceBrowseReply"
}
-->

# DNSServiceBrowseReply

Callback for handling the results of previous calls to DNSServiceBrowse.

```
typealias DNSServiceBrowseReply = (DNSServiceRef?, DNSServiceFlags, UInt32, DNSServiceErrorType, UnsafePointer<CChar>?, UnsafePointer<CChar>?, UnsafePointer<CChar>?, UnsafeMutableRawPointer?) -> Void
```

## Parameters

`sdRef`

The DNSServiceRef initialized by [`DNSServiceBrowse(_:_:_:_:_:_:_:)`](/documentation/dnssd/DNSServiceBrowse(_:_:_:_:_:_:_:)).

`flags`

Possible values are [`kDNSServiceFlagsMoreComing`](/documentation/dnssd/kDNSServiceFlagsMoreComing) and kDNSServiceFlagsAdd. See flag definitions for details.

`interfaceIndex`

The interface on which the service is advertised. This index should be passed to [`DNSServiceResolve(_:_:_:_:_:_:_:_:)`](/documentation/dnssd/DNSServiceResolve(_:_:_:_:_:_:_:_:)) when resolving the service.

`errorCode`

Will be [`kDNSServiceErr_NoError`](/documentation/dnssd/kDNSServiceErr_NoError) (0) on success, otherwise will indicate the failure that occurred. Other parameters are undefined if the errorCode is nonzero.

`serviceName`

The discovered service name. This name should be displayed to the user, and stored for subsequent use in the [`DNSServiceResolve(_:_:_:_:_:_:_:_:)`](/documentation/dnssd/DNSServiceResolve(_:_:_:_:_:_:_:_:)) call.

`regtype`

The service type, which is usually (but not always) the same as was passed to [`DNSServiceBrowse(_:_:_:_:_:_:_:)`](/documentation/dnssd/DNSServiceBrowse(_:_:_:_:_:_:_:)). One case where the discovered service type may not be the same as the requested service type is when using subtypes: The client may want to browse for only those ftp servers that allow anonymous connections. The client will pass the string “_ftp._tcp,_anon” to [`DNSServiceBrowse(_:_:_:_:_:_:_:)`](/documentation/dnssd/DNSServiceBrowse(_:_:_:_:_:_:_:)), but the type of the service that’s discovered is simply “_ftp._tcp”. The regtype for each discovered service instance should be stored along with the name, so that it can be passed to [`DNSServiceResolve(_:_:_:_:_:_:_:_:)`](/documentation/dnssd/DNSServiceResolve(_:_:_:_:_:_:_:_:)) when the service is later resolved.

`replyDomain`

The domain of the discovered service instance. This may or may not be the same as the domain that was passed to [`DNSServiceBrowse(_:_:_:_:_:_:_:)`](/documentation/dnssd/DNSServiceBrowse(_:_:_:_:_:_:_:)). The domain for each discovered service instance should be stored along with the name, so that it can be passed to [`DNSServiceResolve(_:_:_:_:_:_:_:_:)`](/documentation/dnssd/DNSServiceResolve(_:_:_:_:_:_:_:_:)) when the service is later resolved.

`context`

The context pointer that was passed to the callout.

---

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)