Add back current SSID API

This commit is contained in:
Zhigang Fang
2017-05-17 19:19:14 +08:00
parent 82a1dc2e22
commit 4f36e06c3d

View File

@@ -58,7 +58,7 @@ final class SSID: NSObject {
}
}
private var current: String? {
var current: String? {
if let interfaces = CNCopySupportedInterfaces() {
for i in 0..<CFArrayGetCount(interfaces) {
let interfaceName: UnsafeRawPointer = CFArrayGetValueAtIndex(interfaces, i)
@@ -80,4 +80,8 @@ extension OSCKit {
return SSID.shared.subscribe(onChange: changed)
}
public var currentSSID: String? {
return SSID.shared.current
}
}