<!--
{
  "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/netService(_:didUpdateTXTRecord:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(pl)NSNetServiceDelegate(im)netService:didUpdateTXTRecordData:"
  },
  "title" : "netService(_:didUpdateTXTRecord:)"
}
-->

# netService(_:didUpdateTXTRecord:)

Notifies the delegate that the TXT record for a given service has been updated.

```
optional func netService(_ sender: NetService, didUpdateTXTRecord data: Data)
```

## Parameters

`sender`

The service whose TXT record was updated.

`data`

The new TXT record.

## See Also

[`-  startMonitoring`](/documentation/Foundation/NetService/startMonitoring())

Starts the monitoring of TXT-record updates for the receiver.



---

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)