Type Method
dictionaryFromTXTRecordData:
Returns a dictionary representing a TXT record given as an NSData
object.
SDKs
- iOS 2.0+
- macOS 10.4+
- Mac Catalyst 13.0+
- tvOS 9.0+
Parameters
txtData
A data object encoding a TXT record.
Return Value
A dictionary representing txtData
. The dictionary’s keys are NSString
objects using UTF8 encoding. The values associated with all the dictionary’s keys are NSData
objects that encapsulate strings or data.
Fails an assertion if txtData
cannot be represented as an NSDictionary
object.
See Also
Configuring Network Services
addresses
A read-only array containing NSData
objects, each of which contains a socket address for the service.
domain
A string containing the domain for this service.
includesPeerToPeer
Specifies whether to also publish, resolve, or monitor this service over peer-to-peer Bluetooth and Wi-Fi, if available. NO
by default.
- getInputStream:outputStream:
Creates a pair of input and output streams for the receiver and returns a Boolean value that indicates whether they were retrieved successfully.
name
A string containing the name of this service.
type
The type of the published service.
- setTXTRecordData:
Sets the TXT record for the receiver, and returns a Boolean value that indicates whether the operation was successful.