get current WiFi ssid

With iOS 9 beta 4, the CNCopySupportedInterfaces API is broken.

(it was working until beta3)

So my app can't get current wifi ssid.


It should be possible to use [NEHotspotHelper supportedNetworkInterfaces]

However it returns always nil.


How is it possible to get current ssid ?

(I don't want to manage hotspot network)

Accepted Reply

Looks like it works again in iOS 9 GM

Indeed.

I also want to draw your attention to the big **** comment at the top of

<SystemConfiguration/CaptiveNetwork.h>
in the iOS 9 SDK included with the Xcode 7.0 GM seed. To wit:

IMPORTANT This API is deprecated starting in iOS 9. For captive network applications, this has been completely replaced by

<NetworkExtension/NEHotspotHelper.h>
. For other applications, there is no direct replacement. Please file a bug describing your use of this API so that we can consider your requirements as this situation evolves.

If you do file a bug about this please send me, via email, your bug number. My email address is in my signature, below. For the next month or so I’m going to collect input on this issue.

You should, of course, feel free to continue discussing the issue here on DevForums.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Replies

I'm in the same boat. Just found that out today. This *****

I have a same problem.

I can't get ssid and BSSID.

Well since the old method doesn't work at all and the new method doesn't seem to work I would say it's a bug that we should all report to apple

Ah, good to know that there is a new API, so it's most likely a bug.

With the old deprecated API, I was already afraid they blocked access to the SSID due to privacy concerns.


Will report a bug too.

I guess Apple is focusing on the hotspot issue. While I still think it is a bug it seems that if you want to use the newer methods you have to register as hotspot helper app. I think most of us that were using the CaptiveNetwork features to get the SSID for the current network were using it as a side effect that apple didn't plan for and didn't know people were using that way. Hopefully we can still use it in iOS 9.


#import <NetworkExtension/NetworkExtension.h>

NSArray * networkInterfaces = [NEHotspotHelper supportedNetworkInterfaces];
NSLog(@"Networks %@",networkInterfaces);

Seeing same issue


file bug report 21964534

This is a follow-up to Bug ID# 21964534.


Engineering has determined that this issue behaves as intended based on the following information:


Please use the NEHotspotHelper API instead.


We consider this issue closed.

But is this method is working and give the SSID?

If NEHotspothelper gave a null result ...

First of all, thanks for all your feedback about this issue (both formal, via Radar, and informal, via DevForums, email, and so on).

Second, be aware that this is not a accidental change (r. 15225882): rather, Apple has serious concerns about the privacy implications of

CNCopySupportedInterfaces
and now that its expected use case, dealing with captive networks, has been formally replaced via NEHotspotHelper, it seemed like a good time to make this change.

However, it's now clear that lots of developers are using

CNCopySupportedInterfaces
for things other than dealing with captive networks. That feedback is being considered by the relevant parties here at Apple and there may be future changes based on it. I can't offer any further insight into that process.

Regardless of how this issue is resolved, I've made it clear that this issue needs to be covered in the release notes (r. 22068424).

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

My request to use the Network Extension framework has been denied (626193135).


My already released app will crash when my users upgrade to iOS 9. This will make for hundreds of unhappy customers.


What is an alternative way to read the current WiFi SSID if I am not allowed to use the Network Extension framework?

Hi Turbo3, were you given a reason?

adpward wrote:

were you given a reason?

I can't speak to Turbo3's specific case but, in general, the NEHotspotHelper mechanism is designed for folks doing captive network management apps. If you're not creating a captive network management app, it's not appropriate to use NEHotspotHelper.

Turbo3 wrote:

My already released app will crash when my users upgrade to iOS 9. This will make for hundreds of unhappy customers.

Yeah, that's obviously not good, and we're taking this issue very seriously. Alas, I can't offer further insight into this issue at this time. I will, however, post updates to this thread as things develop.

What is an alternative way to read the current WiFi SSID if I am not allowed to use the Network Extension framework?

Just to satisfy my own curiosity, what are you using the current Wi-Fi SSID for?

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Can't speak for Turbo, but I've had a lot of experience with Wi-Fi and one of the most common reasons many of our customers want access to it is as an extra security vector. For example, banks perform numerous checks to try to verify the user and verifying they are connecting from a previously known BSSID/SSID combo is commonly used for that type of security weighting.

Thanks, Quinn. Not the answer we're hoping for, but it helps us speculate about the future. I filed Radar 22147499.


I'd also like to point out that deprecation means an API is unchanged for now, but will go away in the future. It seems to me that you might as well remove CNCopySupportedInterfaces() altogether if it's always going to return NULL, rather than mark it deprecated.

Thank you for a very detailed answer. It is appreciated.