<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WiFiAware",
  "identifier" : "/documentation/WiFiAware/WAService",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Wi-Fi Aware"
    ],
    "preciseIdentifier" : "s:9WiFiAware9WAServiceP"
  },
  "title" : "WAService"
}
-->

# WAService

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

```
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](https://datatracker.ietf.org/doc/html/rfc6763#section-4.1.2) and [RFC 6335](https://datatracker.ietf.org/doc/html/rfc6335#section-5.1). 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](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml) 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

[`static var allServices: [String : Self]`](/documentation/WiFiAware/WAService/allServices)

A dictionary of all services declared by your app, indexed by service name.

### Checking a service name

[`var name: String`](/documentation/WiFiAware/WAService/name)

The full name of the service, as sent over the air.

## Relationships

### Conforming Types

[`WAPublishableService`](/documentation/WiFiAware/WAPublishableService)

[`WASubscribableService`](/documentation/WiFiAware/WASubscribableService)

### Inherits From

[`Decodable`](/documentation/Swift/Decodable)

[`Encodable`](/documentation/Swift/Encodable)

[`Identifiable`](/documentation/Swift/Identifiable)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

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)