1

I'm trying to implement an app that uses the BSSID of the network that the user is currently connected to on iOS 13.

However, Apple's documentation for CNCopyCurrentNetworkInfo on iOS 13 is not clear in its requirements for usage of their API.

It states the following in its description:

The requesting app must meet one of the following requirements:

  • The app uses Core Location, and has the user’s authorization to use location information.

  • The app uses the NEHotspotConfiguration API to configure the current Wi-Fi network.

  • The app has active VPN configurations installed.

This seems to suggest that only needs to meet one out of the 3 requirements listed above.

However, it subsequently states:

An app that fails to meet any of the above requirements receives the following return value:

  • An app linked against iOS 12 or earlier receives a dictionary with pseudo-values. In this case, the SSID is Wi-Fi (or WLAN in the China region), and the BSSID is 00:00:00:00:00:00.

  • An app linked against iOS 13 or later receives NULL.

This suggests that the app needs to meet all of the above requirements

This makes it extremely confusing as to what the requirements are, since the former part claims that you only need to implement one of the three in order to get the BSSID, whereas the latter part states that you won't get it if you miss out on any of the three requirements.

Any help on this would be much appreciated!

Community
  • 1
  • 1
Shinlos
  • 137
  • 1
  • 10
  • For me, you need both the "Core Location" permission AND have set the "Access WiFi information" capabilities. – MadProgrammer Sep 24 '19 at 03:50
  • I have both location permission and WiFi Capability, but still no SSID retrieved. Did you manage to retrieve the SSID with iOS 13.0 Release? – Benny Davidovitz Sep 24 '19 at 07:05
  • @BennyDavidovitz In all honestly it would make more sense that we only need to fulfil at least one condition to work, and this is corroborated when reading the keynote. I tried updating to iOS 13.1 beta and it's working again, so it's a bit of a mystery what's wrong with iOS 13.0 – Shinlos Sep 24 '19 at 08:37
  • @Shinlos try to run on iOS 13 release. I know that beta is fine. You can see in this discussion (https://github.com/HackingGate/iOS13-WiFi-Info/issues/7) that I am not the the crazy guy. – Benny Davidovitz Sep 24 '19 at 08:48
  • UPDATE: restart the iOS device solved it (not only for me) – Benny Davidovitz Oct 02 '19 at 06:19

2 Answers2

1

Your second quote does say ”any,” so not sure why you you think it suggests ”all.“

Have you tried it on 13.3 (17C54)?

I’ve had a few problems with a few apps. I started wondering if it was an “always enable location,” vs “only when using app.”

0

You do not appear to be alone in this problem.

According to the github thread below, SSID retrieval appears to be problematic even on the latest version of iOS (13.2.2).

In the link below, you will find that Apple has most likely fixed this issue on iOS 13.3, which is now in beta. I suggest we all test it and see what the results are.

https://github.com/HackingGate/iOS13-WiFi-Info/issues/7

iNF3Rnus
  • 1
  • 1