init
TypeScriptstatic initApplicationService(applicationService: string): NWListener_ServiceSwift declarationinit(applicationService: String)Create an Application service to advertise for the listener.
struct · iOS 12.0+ · SDK 27.1
struct ServiceDefines a service to advertise
static initApplicationService(applicationService: string): NWListener_ServiceSwift declarationinit(applicationService: String)Create an Application service to advertise for the listener.
get noAutoRename(): booleanSwift declarationvar noAutoRename: Bool { get set }By default, advertised services may be automatically renamed if there is a conflict with other service names on the network. Set noAutoRename to true to disable this behavior.
set noAutoRename(value: boolean)Swift declarationvar noAutoRename: Bool { get set }By default, advertised services may be automatically renamed if there is a conflict with other service names on the network. Set noAutoRename to true to disable this behavior.
get txtRecordObject(): (NWTXTRecord) | nullSwift declarationvar txtRecordObject: NWTXTRecord? { get set }A convenience Bonjour TXT Record object. Setting this on an NWListener means it will advertise additional metadata about its service when the listener is active. An NWBrowser searching for the listener's service will be able to retrieve the metadata during browsing. Update the txtRecord by setting the service on the listener with the same name/type/domain and a new TXT record object.
set txtRecordObject(value: (NWTXTRecord) | null)Swift declarationvar txtRecordObject: NWTXTRecord? { get set }A convenience Bonjour TXT Record object. Setting this on an NWListener means it will advertise additional metadata about its service when the listener is active. An NWBrowser searching for the listener's service will be able to retrieve the metadata during browsing. Update the txtRecord by setting the service on the listener with the same name/type/domain and a new TXT record object.
get debugDescription(): stringSwift declarationvar debugDescription: String { get }A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.
static initNameTypeDomainTxtRecord(name: (string) | null, type: string, domain?: (string) | null, txtRecord?: (ArrayBuffer) | null): NWListener_ServiceSwift declarationinit(name: String? = nil, type: String, domain: String? = nil, txtRecord: Data? = nil)Create a Service to advertise for the listener. Name, domain, and txtRecord all default to nil.
static initNameTypeDomainTxtRecord45304(name: (string) | null, type: string, domain: (string) | null, txtRecord: NWTXTRecord): NWListener_ServiceSwift declarationinit(name: String? = nil, type: String, domain: String? = nil, txtRecord: NWTXTRecord)Create a Service to advertise for the listener with an NWTXTRecord. Name and domain default to nil.
get name(): (string) | nullSwift declarationlet name: String?Bonjour service name - if nil the system name will be used
get type(): stringSwift declarationlet type: StringBonjour service type
get domain(): (string) | nullSwift declarationlet domain: String?Bonjour service domain - if nil the system will register in all appropriate domains
get txtRecord(): (ArrayBuffer) | nullSwift declarationlet txtRecord: Data?Bonjour txtRecord - metadata for the service. Update the txtRecord by setting the service on the listener with the same name/type/domain and a new txtRecord.
No declarations were skipped in this snapshot.