CNCopyCurrentNetworkInfo() does NOT work on iOS13beta(17A5492t)

myApp has "Access WiFi Information Entitlement" as:

<key>com.apple.developer.networking.wifi-info</key>

<true/>


CNCopyCurrentNetworkInfo() works on iOS12.3.1.

But it returns nil on iOS13 with same network environment as iOS12.3.1.

Accepted Reply

Check out WWDC 19 session 713, Advances in Networking, Part 2 (maybe 75% of the way through the presentation). CNCopyCurrentNetworkInfo is now only available to your app in three cases:


  • Apps with permission to access location
  • Your app is the currently enabled VPN app
  • Your app configured the WiFi network the device is currently using via NEHotspotConfiguration


If you don't meet at least one of these conditions CNCopyCurrentNetworkInfo will always return nil in iOS 13.


Having said all of that, I have ensured now that my app does have "Always Allow" location but I am still receiving nil from CNCopyCurrentNetworkInfo. Will report back if I figure it out.


EDIT: disregard that last statement, forgot I had commented out CNCopyCurrentNetworkInfo while attempting to implement the new WiFi framework 😁

Replies

same here 😟

+1

I am not getting SSID from CNCopyCurrentNetworkInfo in iOS 13.0


Project is satisfied following cases:


1. Apps with permission to access location

2. Your app configured the WiFi network the device is currently using via NEHotspotConfiguration


Added following in .entitlements file:


<key>com.apple.developer.networking.HotspotConfiguration</key>

<true/>


<key>com.apple.developer.networking.wifi-info</key>

<true/>


I have followed many solutions but didn't work. Please suggest some solution to get SSID in iOS 13.


It would be great help! 🙂

I've had this problem occasionally with iOS 13.1.3. After rebooting the system, it returned to normal

I am having the same issue as you on the latest release of iOS13. I have "Always" location permissions and I still mostly get "nil" from calling

CNCopyCurrentNetworkInfo()


My testers have advised that it will sometimes return the correct value, but we have yet to be able to reliably recreate this situation.

CNCopyCurrentNetworkInfo