<!--
{
  "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/DNSServiceRegisterReply",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "dnssd"
    ],
    "preciseIdentifier" : "c:@T@DNSServiceRegisterReply"
  },
  "title" : "DNSServiceRegisterReply"
}
-->

# DNSServiceRegisterReply

Handler for the results from a previous call to [`DNSServiceRegister(_:_:_:_:_:_:_:_:_:_:_:_:)`](/documentation/dnssd/DNSServiceRegister(_:_:_:_:_:_:_:_:_:_:_:_:)).

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

## Parameters

`sdRef`

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

`flags`

When a name is successfully registered, the callback will be invoked with the kDNSServiceFlagsAdd flag set. When Wide-Area DNS-SD is in use, it is possible for a single service to get more than one success callback (e.g. one in the “local” multicast DNS domain, and another in a wide-area unicast DNS domain). If a successfully-registered name later suffers a name conflict or similar problem and has to be deregistered, the callback will be invoked with the kDNSServiceFlagsAdd flag not set. The callback is *not* invoked in the case where the caller explicitly terminates the service registration by calling DNSServiceRefDeallocate(ref);

`errorCode`

Will be [`kDNSServiceErr_NoError`](/documentation/dnssd/kDNSServiceErr_NoError) on success, otherwise will indicate the failure that occurred (including name conflicts, if the kDNSServiceFlagsNoAutoRename flag was used when registering.) Other parameters are undefined if errorCode is nonzero.

`name`

The service name registered (if the application did not specify a name in [`DNSServiceRegister(_:_:_:_:_:_:_:_:_:_:_:_:)`](/documentation/dnssd/DNSServiceRegister(_:_:_:_:_:_:_:_:_:_:_:_:)), this indicates what name was automatically chosen).

`regtype`

The type of service registered, as it was passed to the callout.

`domain`

The domain on which the service was registered (if the application did not specify a domain in [`DNSServiceRegister(_:_:_:_:_:_:_:_:_:_:_:_:)`](/documentation/dnssd/DNSServiceRegister(_:_:_:_:_:_:_:_:_:_:_:_:)), this indicates the default domain on which the service was registered).

`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)