<!--
{
  "availability" : [
    "iOS: 26.2.0 -",
    "iPadOS: 26.2.0 -",
    "macCatalyst: 26.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WiFiInfrastructure",
  "identifier" : "/documentation/WiFiInfrastructure/WINetworkSharingError",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Wi-Fi Infrastructure"
    ],
    "preciseIdentifier" : "s:18WiFiInfrastructure21WINetworkSharingErrorO"
  },
  "title" : "WINetworkSharingError"
}
-->

# WINetworkSharingError

Error codes for Wi-Fi network-sharing functionality.

```
enum WINetworkSharingError
```

## Overview

The Wi-Fi network-sharing API throws `WINetworkSharingError` instances when there are
issues with accessories, network availability, permissions, or system state.

## Topics

### Checking for general errors

[`case error`](/documentation/WiFiInfrastructure/WINetworkSharingError/error)

Indicates a general error occurred.

### Checking for timeouts

[`case timeout`](/documentation/WiFiInfrastructure/WINetworkSharingError/timeout)

Indicates the requested operation timed out.

### Checking for app issues

[`case appNotPermitted`](/documentation/WiFiInfrastructure/WINetworkSharingError/appNotPermitted)

Indicates the person hasn’t granted your app permission to use the shared networks API for the accessory.

[`case appNotInForeground`](/documentation/WiFiInfrastructure/WINetworkSharingError/appNotInForeground)

Indicates your app can’t perform the requested operation because it isn’t running in the foreground.

### Checking for unsupported host capabilities

[`case wifiNetworkSharingUnsupported`](/documentation/WiFiInfrastructure/WINetworkSharingError/wifiNetworkSharingUnsupported)

Indicates the device doesn’t support Wi-Fi network sharing.

### Checking for communication failures

[`case communicationFailure`](/documentation/WiFiInfrastructure/WINetworkSharingError/communicationFailure)

Indicates the app failed to communicate with the shared network system.

### Checking for no available networks

[`case noAvailableNetworks`](/documentation/WiFiInfrastructure/WINetworkSharingError/noAvailableNetworks)

Indicates the system found no sharable networks nearby.

### Checking for excessive requests

[`case tooManyRequests`](/documentation/WiFiInfrastructure/WINetworkSharingError/tooManyRequests)

Indicates the accessory exceeded the maximum number of requests.

### Checking for accessory issues

[`case accessoryNotConfigured`](/documentation/WiFiInfrastructure/WINetworkSharingError/accessoryNotConfigured)

Indicates the person hasn’t configured the accessory on this system.

[`case accessoryNotAuthorized`](/documentation/WiFiInfrastructure/WINetworkSharingError/accessoryNotAuthorized)

Indicates the person didn’t grant the accessory authorization to access network information.

[`case accessoryNotConnected`](/documentation/WiFiInfrastructure/WINetworkSharingError/accessoryNotConnected)

Indicates the accessory isn’t connected to the host.

[`case noAccessoryScanResponse`](/documentation/WiFiInfrastructure/WINetworkSharingError/noAccessoryScanResponse)

Indicates the accessory didn’t send a scan response.

[`case accessoryTransportNotSecured`](/documentation/WiFiInfrastructure/WINetworkSharingError/accessoryTransportNotSecured)

Indicates the accessory doesn’t use the required transport security, such as Bluetooth Secure Connections.

[`case noMatchingAccessoryScanRequest`](/documentation/WiFiInfrastructure/WINetworkSharingError/noMatchingAccessoryScanRequest)

Indicates the system found no matching scan request pending for the accessory.

## Relationships

### Conforms To

[`LocalizedError`](/documentation/Foundation/LocalizedError)

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

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

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

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

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

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

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

---

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)