Contents

WAService

A protocol that defines a service that a device can publish or subscribe to.

Declaration

protocol WAService : CustomStringConvertible, Decodable, Encodable, Hashable, Identifiable, Sendable

Overview

A service represents a specific function or use case that’s performed over Wi-Fi Aware. Services are specific functionality and protocols that your app can publish or subscribe to on other devices.

Services are identified by a service name string that follows the rules in RFC 6763 and RFC 6335. For a service name of example-service, the full service name encoded in the Info.plist and sent over the air is either _example-service._tcp if using the TCP protocol or _example-service._udp if using any other protocol.

You must register your app with a unique name in the IANA service name registry to avoid conflicts with other apps and devices.

If you have an invalid service name in the Info.plist, your app crashes.

Topics

Selecting from your app’s services

Checking a service name

See Also

Services to discover