Search code examples
iosxcodewifi

Accessing Wifi SSID name - Xcode 15.1


I am creating an app which grabs the current SSID name of the network that the device is connected to and performs some actions on it. I have written the code, but whenever I run this I get the error

nehelper sent invalid result code [1] for Wi-Fi information request

I have added the correct permissions for usage description within the Info section of the main project, and I have handled requesting location permissions from the user.

NSLocationAlwaysAndWhenInUseUsageDescription
NSLocationWhenInUseUsageDescription

I have seen that as of iOS 12, I need to add com.apple.developer.networking.wifi-info into the entitlement capabilities, on the Signing & Capabilities section, but when pressing the +Capability button, this string is not found, only Wireless Accessory Configuration for MFi devices.

I did find another page that said I need to enable Wifi access info within my developer account, however I can't seem to find where to do this.

Running Xcode 15.1. Device installing the test app is iPhoneX 15.6

What do I need to do to access the SSID name please?


Solution

  • You need to have a paid developer membership to add the "Access Wifi information" capability.

    Without this capability you will not be able to obtain the current SSID.

    For reference, the capabilities available under the various membership types are listed on this page. The third column, "Apple Developer" is the free level. The first column, ADP (Apple Developer Program) is the paid level.

    Table showing that Access Wifi information is only available to ADP and ADEP levels