diff options
author | 2024-02-28 10:28:12 +0100 | |
---|---|---|
committer | 2024-02-28 10:28:12 +0100 | |
commit | a37ae8a99b9edb363eb084e17eec35f3c4761313 (patch) | |
tree | 06b2db1fd7565b9d615c2e79ba022e3cc7c3f690 /Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift | |
parent | Remove backward compatibility of GetPeers with SiriKit version (diff) | |
parent | App: version bump (diff) | |
download | wireguard-apple-an/shortcuts-integration.tar.xz wireguard-apple-an/shortcuts-integration.zip |
Merge branch 'master' into an/shortcuts-integrationan/shortcuts-integration
Diffstat (limited to 'Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift')
-rw-r--r-- | Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift b/Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift index d32fa8c..ef9a88c 100644 --- a/Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift +++ b/Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import UIKit import SystemConfiguration.CaptiveNetwork @@ -185,11 +185,7 @@ extension SSIDOptionEditTableViewController { private func noSSIDsCell(for tableView: UITableView, at indexPath: IndexPath) -> UITableViewCell { let cell: TextCell = tableView.dequeueReusableCell(for: indexPath) cell.message = tr("tunnelOnDemandNoSSIDs") - if #available(iOS 13.0, *) { - cell.setTextColor(.secondaryLabel) - } else { - cell.setTextColor(.gray) - } + cell.setTextColor(.secondaryLabel) cell.setTextAlignment(.center) return cell } @@ -268,23 +264,8 @@ extension SSIDOptionEditTableViewController { #if targetEnvironment(simulator) completionHandler("Simulator Wi-Fi") #else - if #available(iOS 14, *) { - NEHotspotNetwork.fetchCurrent { hotspotNetwork in - completionHandler(hotspotNetwork?.ssid) - } - } else { - if let supportedInterfaces = CNCopySupportedInterfaces() as? [CFString] { - for interface in supportedInterfaces { - if let networkInfo = CNCopyCurrentNetworkInfo(interface) { - if let ssid = (networkInfo as NSDictionary)[kCNNetworkInfoKeySSID as String] as? String { - completionHandler(!ssid.isEmpty ? ssid : nil) - return - } - } - } - } - - completionHandler(nil) + NEHotspotNetwork.fetchCurrent { hotspotNetwork in + completionHandler(hotspotNetwork?.ssid) } #endif } |