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

Yup, I can confirm the same. This is great, because this change broke every app that I have to connect to a camera via Wi-Fi. Ha....

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"

In response to my request for access to the Network Extension APIs, Apple Developer Technical Support let me know that both CNCopySupportedInterfaces and CNCopyCurrentNetworkInfo are re-enabled in the latest version of iOS9.


They also mentioned the URL to the documentation, which no longer shows CaptiveNetwork as being deprecated:

https://developer.apple.com/library/ios/documentation/SystemConfiguration/Reference/CaptiveNetworkRef/


This is really good news!

Look at the iOS 9 Documentation that is shipped with Xcode 7 GM: CaptiveNetwork API is "Deprecated in iOS 9.0." The public documentation will be updated as soon as Xcode 7 is released.

Hello Eskimo,


I am able to get the list of SSID using : [NEHotspotHelper supportedNetworkInterfaces];


BUT, now I want to block the CAN Popup also and allow it to be handled from my application itself. Prior to iOs9, I was able to do it using "CNMarkPortalOnline" but since it is depricated now, is there any other alternative method to do it using NEHotspotHelper ?


Kindly provide your reply at your earliest convenience.


Thanks.

Hello Eskimo,

I am able to get the list of SSID using : [NEHotspotHelper supportedNetworkInterfaces];

BUT, now I want to block the CAN Popup also and allow it to be handled from my application itself. Prior to iOs9, I was able to do it using "CNMarkPortalOnline" but since it is depricated now, is there any other alternative method to do it using NEHotspotHelper ?

Kindly provide your reply at your earliest convenience.

Thanks.

I have the same problem. My customers are unhappy

i'm coming in a bit late here. but even so ... with verry little activity on this thread in several weeks, it is still unclear whether or not being able to READ (only!) the SSID will be available in future without having to (attempt ... and likely be denied) be granted (how magnamamous!) a Hotspot helper entitlement.


nor is it clear if the functionality will, indeed, be gone from (some future?) IOS9.


my app can behave more efficiently (and the network it is on can be more efficient) if it is aware that it is on the "local" network v. accessing the same resources over some other, non-local network.


sure .. i could come up with a rather kludgey method of attempting to determine if i was on the "target" network or not ... but seriously!?!


readability of the current SSID is NOT a "security" issue.

I can see the privacy issues with reading SSIDs, however CNCopySupportedInterfaces() alone only returns a list of WiFi interfaces, which in most cases I assume will simply be @[@"en0"], e.i. the one WiFi network interface in the device. I can't see a privacy issue with that. So it's pobably been deprecated simply because all it's friends are?

My use case relates to determining the IP address of the WiFi interface on the local network and I was using CNCopySupportedInterfaces() to 'reliably' (there goes that part) know the name of the WiFi interface instead of assuming it's en0. But perhaps there is a recommended way for doing that without using the captive network work around? Or is assuming en0 considered future prove?