---
title: txtRecord
framework: networkextension
role: symbol
role_heading: Instance Property
path: networkextension/nwtcpconnection/txtrecord
---

# txtRecord

The TXT record associated with a connected Bonjour service endpoint.

## Declaration

```swift
var txtRecord: Data? { get }
```

## Discussion

Discussion When the connection is connected to a Bonjour service endpoint, the TXT record associated with the Bonjour service is available via this property. important: Note that the value comes from an untrusted network source. Care must be taken when parsing this potentially malicious value.

## See Also

### Getting connection properties

- [endpoint](networkextension/nwtcpconnection/endpoint.md)
- [localAddress](networkextension/nwtcpconnection/localaddress.md)
- [remoteAddress](networkextension/nwtcpconnection/remoteaddress.md)
- [connectedPath](networkextension/nwtcpconnection/connectedpath.md)
