1. Project: Vitcon Wifi manager 2. Developer: Khánh Nguyên
The first one, we need to enable the Access WiFi Information capability in Xcode
With iOS < 13, we can use CNCopyCurrentNetworkInfo() .
CNCopyCurrentNetworkInfo() returns nil in iOS 13 and later
Watch WWDC19 Session 713:Advances in Networking, Part 2.
Now you all know the important privacy to Apple. And one of the things we realized. Is that… Accessing Wi-Fi information can be used to infer location.
So starting now, to access that Wi-Fi information. You’ll need the same kind of privileges that you’ll need to get other location information.
Access Wi-Fi Information
- Must also meet at least one of criteria below
- Apps with permission to access location
- Currently enabled VPN app
NEHotspotConfiguration (only Wi-Fi networks that the app configured)
Get Wi-Fi SSID in iOS 13 and later
Import Core Location framework
Permision request in Info.plist
Create Model and Variables
Function to update UI (Get Wifi name)
Ask location permission