Created
July 14, 2016 12:47
-
-
Save werediver/b1d5ed625a3fbf538481e40a71b4d1ac to your computer and use it in GitHub Desktop.
Get the connected Wi-Fi network SSID on iOS (in Swift).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import SystemConfiguration.CaptiveNetwork | |
func getWiFiSsid() -> String? { | |
var ssid: String? | |
if let interfaces = CNCopySupportedInterfaces() as NSArray? { | |
for interface in interfaces { | |
if let interfaceInfo = CNCopyCurrentNetworkInfo(interface as! CFString) as NSDictionary? { | |
ssid = interfaceInfo[kCNNetworkInfoKeySSID as String] as? String | |
break | |
} | |
} | |
} | |
return ssid | |
} |
Hi Guys I have to validate the password of connected Wifi Router. am able to get the SSID But I need validation password also to validate User Entered password is correct or not.
Hi Guys I have to validate the password of connected Wifi Router. am able to get the SSID But I need validation password also to validate User Entered password is correct or not.
How you are able to get the connected Wifi Router name? I have iOS 17.4.1 and i want to display connected wifi name in my react native app. Can you please share details ?
Thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After installing the 13.3 GM release, I was able to get the command to working.
I was also able to get the FGRoute pod to work fine except for the FGRoute.getSSIDDATA() function as it's causing my application to crash, although I don't need that function.
https://github.com/Feghal/FGRoute