- Ref. CN5E, NT@UW, WUSTL
CS5530
CS5530 Mobile/Wireless Systems More on Swift
Yanyan Zhuang
Department of Computer Science http://www.cs.uccs.edu/~yzhuang
- UC. Colorado Springs
CS5530 Mobile/Wireless Systems More on Swift Yanyan Zhuang - - PowerPoint PPT Presentation
CS5530 Mobile/Wireless Systems More on Swift Yanyan Zhuang Department of Computer Science http://www.cs.uccs.edu/~yzhuang UC. Colorado Springs CS5530 Ref. CN5E, NT@UW, WUSTL Overview Optional WiFi interface Location manager
CS5530
2 CS5530
3 CS5530
4 CS5530
5 CS5530
6 CS4500/5500
func getSSID() -> String? { var ssid, bssid, info: String? if let interfaces = CNCopySupportedInterfaces() as NSArray? { for interface in interfaces { print(interfaces) if let interfaceInfo = CNCopyCurrentNetworkInfo(interface as! CFString) as NSDictionary? { print(interfaceInfo) ssid = interfaceInfo[kCNNetworkInfoKeySSID as String] as? String bssid = interfaceInfo[kCNNetworkInfoKeyBSSID as String] as? String info = ssid! + ": " + bssid! break } } } return info }
7 CS5530
8 CS5530