Drop #available(iOS 14) (#317)
This commit is contained in:
parent
8f066a9e48
commit
c62fc4adaa
|
@ -15,8 +15,8 @@
|
|||
"repositoryURL": "https://github.com/SwiftyBeaver/SwiftyBeaver",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "2c039501d6eeb4d4cd4aec4a8d884ad28862e044",
|
||||
"version": "1.9.5"
|
||||
"revision": "12b5acf96d98f91d50de447369bd18df74600f1a",
|
||||
"version": "1.9.6"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
|||
"repositoryURL": "https://github.com/passepartoutvpn/wireguard-apple",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "57f9babde0fb7567f31a75e943538022f8725f8f",
|
||||
"revision": "73d9152fa0cb661db0348a1ac11dbbf998422a50",
|
||||
"version": "1.0.17"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,28 +113,9 @@ public class InterfaceObserver: NSObject {
|
|||
**/
|
||||
public static func fetchCurrentSSID(completionHandler: @escaping (String?) -> Void) {
|
||||
#if os(iOS)
|
||||
if #available(iOS 14, macCatalyst 14, *) {
|
||||
NEHotspotNetwork.fetchCurrent {
|
||||
completionHandler($0?.ssid)
|
||||
}
|
||||
} else if #available(macCatalyst 14, *) {
|
||||
guard let interfaceNames = CNCopySupportedInterfaces() as? [CFString] else {
|
||||
completionHandler(nil)
|
||||
return
|
||||
}
|
||||
for name in interfaceNames {
|
||||
guard let iface = CNCopyCurrentNetworkInfo(name) as? [String: Any] else {
|
||||
continue
|
||||
}
|
||||
if let ssid = iface["SSID"] as? String {
|
||||
completionHandler(ssid)
|
||||
return
|
||||
}
|
||||
}
|
||||
completionHandler(nil)
|
||||
} else {
|
||||
completionHandler(nil)
|
||||
}
|
||||
#else
|
||||
let client = CWWiFiClient.shared()
|
||||
let ssid = client.interfaces()?.compactMap { $0.ssid() }.first
|
||||
|
|
|
@ -332,9 +332,7 @@ public class Keychain {
|
|||
if let accessGroup = accessGroup {
|
||||
query[kSecAttrAccessGroup as String] = accessGroup
|
||||
#if os(macOS)
|
||||
if #available(macOS 10.15, *) {
|
||||
query[kSecUseDataProtectionKeychain as String] = true
|
||||
}
|
||||
#endif
|
||||
}
|
||||
query[kSecAttrService as String] = context
|
||||
|
|
|
@ -232,7 +232,6 @@ extension NetworkSettingsBuilder {
|
|||
return nil
|
||||
}
|
||||
var dnsSettings: NEDNSSettings?
|
||||
if #available(iOS 14, macOS 11, *) {
|
||||
switch localOptions.dnsProtocol {
|
||||
case .https:
|
||||
let dnsServers = localOptions.dnsServers ?? []
|
||||
|
@ -259,7 +258,6 @@ extension NetworkSettingsBuilder {
|
|||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// fall back
|
||||
if dnsSettings == nil {
|
||||
|
|
|
@ -113,9 +113,7 @@ extension OpenVPN.ProviderConfiguration: NetworkExtensionConfiguration {
|
|||
}
|
||||
protocolConfiguration.disconnectOnSleep = extra?.disconnectsOnSleep ?? false
|
||||
protocolConfiguration.providerConfiguration = try asDictionary()
|
||||
if #available(iOS 14, *) {
|
||||
protocolConfiguration.includeAllNetworks = extra?.killSwitch ?? false
|
||||
}
|
||||
return protocolConfiguration
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,9 +83,7 @@ extension WireGuard.ProviderConfiguration: NetworkExtensionConfiguration {
|
|||
protocolConfiguration.passwordReference = extra?.passwordReference
|
||||
protocolConfiguration.disconnectOnSleep = extra?.disconnectsOnSleep ?? false
|
||||
protocolConfiguration.providerConfiguration = try asDictionary()
|
||||
if #available(iOS 14, *) {
|
||||
protocolConfiguration.includeAllNetworks = extra?.killSwitch ?? false
|
||||
}
|
||||
return protocolConfiguration
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue