NEHotspotNetwor.fetchCurrent(completionHandler:)

Hi, I am trying to determine if the WiFi network my iPhone is currently connected to is secure or not.

I am calling NEHotspotNetwor.fetchCurrent(completionHandler:)

I have

  • location permissions granted with precise location.
  • Access WiFi Information Entitlement enabled

The returned network object's isSecure is always false even though securityType is 2 (i.e .personal)

My network security type is WPA2 Personal, both my Mac and iPhone settings recognise that my network is secure

is there something I am missing or an entitlement I need to enable for the API to recognise that my network is secure?

I am running on iOS 15.4.1. Thanks

The isSecure property is supposed to return true if the network is WEP, WPA, or EAP. Given that, I’d call this a bug and I encourage you to file its as such.

Please post your bug number, just for the record.

ps I think that this came about due to the relative age of the APIs. isSecure was part of the original hotspot helper API. Since then we’ve also started using NEHotspotNetwork in -fetchCurrentWithCompletionHandler:, and it’s likely that this has created the disconnect you’re seeing.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hello Eskimo,

I can confirm the bug is still present as isSecure is returning always false even though securityType is 2 (i.e .personal) . I am getting SSID of the connected network without any issues but as mentioned in question isSecure is always false  even though  both my Mac and iPhone settings recognise that my network is secure as WPA2 Personal.

I am calling NEHotspotNetwork.fetchCurrent(completionHandler:) I have

  • location permissions granted with precise location.
  • Access WiFi Information Entitlement enabled in both Xcode and prov profile

I am running on iOS 15.6 this time.

Any idea what is wrong here with isSecure in iOS 15 version? Is this bug fixed in iOS 16 SDK?

Please help

Yours sincerely, Carol

Is this bug fixed in iOS 16 SDK?

ehannaIPD didn’t post their bug number so I’m not even sure that a bug got filed about this )-: Given that, I recommend that you file your own bug. And, yeah, post your bug number, just for the record.

Is this bug fixed in iOS 16 SDK?

This is an issue in iOS itself, not in the SDK.

I tested this on iOS 16.3 and I’m seeing the same results you are.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hello Eskimo ,

Thanks for the confirmation that this is an issue of iOS and even iOS 16.3 have the same bug/issue with isSecure property .

As per your request the bug has been filed with the number [FB11985434] FB11985434 Please have a look at it and hope Apple fixes it in upcoming days as I guess this bug has been there for long.

Regards, Carol

As an information received a reply from Apple for the raised bug and as of now it recommends to use securityType property instead of the buggy isSecure . So moving forward securityType must be used to find the wifi security type which can be only invoked with -fetchCurrentWithCompletionHandler: available from iOS 14 . Also please note securityType is only available from iOS 15 and above.

NEHotspotNetwor.fetchCurrent(completionHandler:)
 
 
Q