TN3111: iOS Wi-Fi API overview
Explore the various Wi-Fi APIs available on iOS and their expected use cases.
Overview
iOS does not have a general-purpose API for Wi-Fi scanning and configuration. However, it does support a wide range of special-purpose Wi-Fi APIs. This technote lists some use cases supported by those special-purpose APIs.
While the focus of this technote is iOS, these APIs are also available on iPadOS.
Navigate an internet hotspot
If your app helps the user navigate an internet hotspot — a Wi-Fi network where the user must interact with the network to gain access to the wider internet — adopt the Hotspot helper API.
To use NEHotspotHelper you must first be granted a special entitlement (com.apple.developer.networking.HotspotHelper) by Apple. For information on how to apply for this, see Hotspot helper.
iOS 26 introduced support for hotspot helper app extensions. Adopt these to improve the efficiency, reliability, and privacy of your hotspot helper app.
Add an accessory to the user’s network
If you’re creating a hardware accessory and you want to make it easy for the user to add it to their local network, your best option is to build your accessory with that in mind. Use one of these approaches:
Wireless Accessory Configuration (WAC) — The user can configure a WAC-capable accessory directly in Settings. Optionally, use EAWiFiUnconfiguredAccessoryBrowser to integrate accessory configuration directly in your app.
HomeKit — Call
HMHomeAPIs like performAccessorySetup(using:completionHandler:) to ask the system to scan for, pair, and configure any unpaired HomeKit accessories .
If your accessory does not support WAC or HomeKit, you can build an accessory configuration experience on top of NEHotspotConfigurationManager, although this will not be as seamless as the WAC and HomeKit accessory experience. For an example of how you might approach this, see Configuring a Wi-Fi accessory to join a network.
Temporarily join a network
If your app needs to temporarily join a Wi-Fi network — for example, you want to interact with a Wi-Fi enabled accessory with its own independent network — use NEHotspotConfigurationManager and set joinOnce to true. For more details, see Wi-Fi configuration.
If you’re working with a Wi-Fi accessory, use AccessorySetupKit to simplify discovery and configuration of your accessory.
Permanently join a network
Some apps need to configure the iOS device to permanently join a Wi-Fi network, as if the user had selected the network in Settings > Wi-Fi. For example, an app from an ISP might do this to get the user’s iOS device on to the Wi-Fi network published by a new DSL gateway that they’ve just installed. If your app needs to do this, use NEHotspotConfigurationManager and set joinOnce to false. For more details, see Wi-Fi configuration.
Peer-to-peer networking
If your goal is to communicate with nearby devices and accessories without configuring a Wi-Fi network, you have two options:
Wi-Fi Aware™ (also known as Neighbor Awareness Networking or NAN)
Apple peer-to-peer Wi-Fi
iOS introduced support for Wi-Fi Aware in iOS 26. It’s supported on iPhone 12 and later. See the Wi-Fi Aware framework documentation for more details.
Wi-Fi Aware is an industry standard specification, opening up the possibility of communicating with non-Apple devices and accessories.
Apple peer-to-peer Wi-Fi dates all the way back to iOS 7. It works on all iOS, iPadOS, macOS, tvOS, and visionOS devices. For information about networking APIs that support Apple peer-to-peer Wi-Fi, see TN3151: Choosing the right networking API.
Apple peer-to-peer Wi-Fi is not documented for third-party use, so this mechanism only works between Apple devices.
Location tracking
If you’d like to use Wi-Fi data to determine the device’s location, use Core Location. This locates the device using a wide variety of techniques, including Wi-Fi. For more information, see Maps and Location.
Current Wi-Fi network
If you need to know the name of the device’s current Wi-Fi network, call fetchCurrent(completionHandler:). That method requires iOS 14 or later. On older systems, call CNCopyCurrentNetworkInfo.
Revision History
2025-08-29 Added information about hotspot helper app extensions and Wi-Fi Aware, both new in iOS 26.
2024-09-24 Added information about AccessorySetupKit. Added a link to TN3151. Made other minor editorial changes.
2022-05-24 Made minor editorial changes.
2022-02-08 Republished as TN3111. Broke the content into task-focused sections. Added a link to Configuring a Wi-Fi accessory to join a network. Added a reference to fetchCurrent(completionHandler:). Updated the text for the new publication platform.
2017-08-14 Added information about
NEHotspotConfigurationManager.2016-11-16 First published as QA1942 ”iOS Wi-Fi Management APIs”.
See Also
Latest
TN3205: Low-latency communication with RDMA over ThunderboltTN3206: Updating Apple Pay certificatesTN3179: Understanding local network privacyTN3190: USB audio device design considerationsTN3194: Handling account deletions and revoking tokens for Sign in with AppleTN3193: Managing the on-device foundation model’s context windowTN3115: Bluetooth State Restoration app relaunch rulesTN3192: Migrating your iPad app from the deprecated UIRequiresFullScreen keyTN3151: Choosing the right networking APITN3191: IMAP extensions supported by Mail for iOS, iPadOS, and visionOSTN3134: Network Extension provider deploymentTN3189: Managing Mail background traffic loadTN3187: Migrating to the UIKit scene-based life cycleTN3188: Troubleshooting In-App Purchases availability in the App StoreTN3186: Troubleshooting In-App Purchases availability in the sandbox