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

Quinn,


I too have this issue and like Turbo3 and others - I was not be allowed to get Hotspot API access

because my App doesn't manage a Hotspot. My app requires SSID to aid the user in making

sure that they are connected ot the proper network


I don't need any other information than this basic SSID...


any suggestions would be appreciated

This is a serious problem for me. My app is used to configure WiFi connected hardware, the hardware is automatically set to use the same SSID as the iOS device. I will now need to prompt the user to enter the SSID, an error prone and unnecessary extra step.


In addition, as noted in another post already, I warn if the iOS device is not connected to the network the hardware is on. This saves endless support headaches.


But worst for me is I also have another 32bit only app that supports older products. It works fine, and doesn't need to be updated ever again. Now this will break in the next few weeks for all my customers who update to iOS 9 (probably most). I don't have the resources to re-write this app for 64 bit, just for legacy customers.


Please reconsider this decision.

Same probelm here. My app simply needs to know what Wi-Fi network(s) it is nonnected to. If for any privacy reason this should not be allowed by default, give the user a chance to grant access.


Applied for Networking.HotspotHelper entitlement. Don't really expect acceptance.


Meanwhile need to inform all customers NOT to upgrade to iOS 9.

I have the same problem. Our app will lose one of its key functionalities by not being able to retrieve the SSID, making for a lot of unhappy users. This is just not right.

Eskimo,

Per your request to share our use case,

This change can kill our business, simple as that.


We use an external device and let our users perform cetrain actions when they are conected to their home wifi SSID.

The users themselves approves this and have a specific screen in the app that shows them the current SSID and allows them to name it and save it.

we do not spy or do anything malicious, so why take this essitial ability from app developers?


What I don't get is:

If you want to increase users' privacy,

why don't you add another grant option for wifi access, same as Location, Motion, Push Notification, Camera, Photos, Contacts etc..?

It's been very silent on Apple's side...

@eskimo, do you have an update regarding this major decision that will not only hit a lot of developers, but a lot of customers as well?


Another thing: 'deprecated' basically means it is going to be removed in a future version.

In this case, 'deprecated' means instantly removed without prior notice? It shouldn't have been removed in the first place.

I'm in the same boat, BUT I really don't need the SSID. I'm using Multipeer Connectivity and just want to know if the user has enabled wifi before starting to advertise. If they haven't , I remind them either wifi or Bluetooth needs to be on.


Things are working fine in checking Bluetooth status, but are now broke for wifi. Is there a way to check wifi status (just that it's on) without having to get the SSID? Reachabiity won't work for me..as I'm not interested in being connected to the internet..just to a wifi network.


Any direction?


If Apple brings back the CNCopySupportedInterfaces API, I'll be okay also.

Lucky you!

Just take a short look at Tony Millons adaption of Reachability, it's very very simple to check the Wi-Fi status only. Links not allowed here. Simply search for "Tony Millon Reachability".

Thank you. I'll look into that. I was under the impression that Reachabilty actually checked for Internet connection and returned connection type if available. I have the case where there could be a private wifi lan not connected to the Internet. Would Reachabilty still return a valid wifi connection in that case?

Just use reachabilityForLocalWiFi, it's really simple.

I see...will look into that. Thank you.

Does Tony Millon's code support reachabilityForLocalWifi also?

Works perfectly. Thank you!

Ditto: we use the current SSID to pre-populate the network name during wifi configuration of the products our customers make; prompting the user to type their SSID as well as their password just increases the chances of them typing it wrongly and a bad user experience. Using WAC isn't exactly an option for the hundreds of thousands of devices out there.


Because the deprecated call is in an SDK that our customers include in their apps, this affects all our customer's apps 😟

jorisvervuurt wrote:

It's been very silent on Apple's side...

You call this silence (-:

@eskimo, do you have an update regarding this […]

No. As I mentioned earlier, I will update this thread when I have more to share.

jorisvervuurt wrote:

Another thing: 'deprecated' basically means it is going to be removed in a future version.

And JetForMe wrote:

I'd also like to point out that deprecation means an API is unchanged for now, but will go away in the future.

Just on a personal level, I totally agree with your definition of the word “deprecated”.

Share and Enjoy

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

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