Commit a672e74c authored by Jose Blaya's avatar Jose Blaya
Browse files

Improve how to reconnect after disconnect VPN manually

parent 41210682
This diff is collapsed.
//
// UIDevice+WiFi.swift
// PIA VPN
//
// Created by Jose Antonio Blaya Garcia on 18/12/2018.
// Copyright © 2018 London Trust Media. All rights reserved.
//
import Foundation
import SystemConfiguration
import UIKit
extension UIDevice {
var WiFiSSID: String? {
guard let interfaces = CNCopySupportedInterfaces() as? [String] else { return nil }
let key = kCNNetworkInfoKeySSID as String
for interface in interfaces {
guard let interfaceInfo = CNCopyCurrentNetworkInfo(interface as CFString) as NSDictionary? else { continue }
return interfaceInfo[key] as? String
}
return nil
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment