mirror of
https://github.com/kkebo/DNSecure.git
synced 2026-03-11 08:54:36 +00:00
Merge pull request #97 from kkebo/swift-6-language-mode
This commit is contained in:
commit
8f7ba01404
10 changed files with 15 additions and 17 deletions
|
|
@ -285,7 +285,7 @@
|
|||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastSwiftUpdateCheck = 1200;
|
||||
LastUpgradeCheck = 1510;
|
||||
LastUpgradeCheck = 1620;
|
||||
TargetAttributes = {
|
||||
8940023724ACBD2700EBE74B = {
|
||||
CreatedOnToolsVersion = 12.0;
|
||||
|
|
@ -547,7 +547,7 @@
|
|||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SWIFT_VERSION = 5.0;
|
||||
SWIFT_VERSION = 6.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
|
|
@ -574,7 +574,7 @@
|
|||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SWIFT_VERSION = 5.0;
|
||||
SWIFT_VERSION = 6.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
|
|
@ -582,7 +582,6 @@
|
|||
8940026124ACBD2800EBE74B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = X4678G5DL2;
|
||||
|
|
@ -603,7 +602,6 @@
|
|||
8940026224ACBD2800EBE74B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = X4678G5DL2;
|
||||
|
|
@ -624,7 +622,6 @@
|
|||
8940026424ACBD2800EBE74B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = X4678G5DL2;
|
||||
INFOPLIST_FILE = DNSecureUITests/Info.plist;
|
||||
|
|
@ -644,7 +641,6 @@
|
|||
8940026524ACBD2800EBE74B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = X4678G5DL2;
|
||||
INFOPLIST_FILE = DNSecureUITests/Info.plist;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1510"
|
||||
LastUpgradeVersion = "1620"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import NetworkExtension
|
||||
|
||||
extension NEOnDemandRuleAction: CaseIterable {
|
||||
extension NEOnDemandRuleAction: @retroactive CaseIterable {
|
||||
public static var allCases: [Self] {
|
||||
[.connect, .disconnect, .evaluateConnection, .ignore]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import NetworkExtension
|
||||
|
||||
extension NEOnDemandRuleAction: CustomStringConvertible {
|
||||
extension NEOnDemandRuleAction: @retroactive CustomStringConvertible {
|
||||
public var description: String {
|
||||
switch self {
|
||||
case .connect:
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import NetworkExtension
|
||||
|
||||
extension NEOnDemandRuleInterfaceType: CaseIterable {
|
||||
extension NEOnDemandRuleInterfaceType: @retroactive CaseIterable {
|
||||
public static var allCases: [Self] {
|
||||
#if os(macOS)
|
||||
return [.any, .ethernet, .wiFi]
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import NetworkExtension
|
||||
|
||||
extension NEOnDemandRuleInterfaceType: CustomStringConvertible {
|
||||
extension NEOnDemandRuleInterfaceType: @retroactive CustomStringConvertible {
|
||||
public var description: String {
|
||||
switch self {
|
||||
case .any:
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ extension Resolvers {
|
|||
}
|
||||
}
|
||||
|
||||
extension Resolvers: RawRepresentable {
|
||||
extension Resolvers: @retroactive RawRepresentable {
|
||||
public init?(rawValue: String) {
|
||||
guard let data = rawValue.data(using: .utf8),
|
||||
let result = try? JSONDecoder().decode(Self.self, from: data)
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ struct ContentView {
|
|||
}
|
||||
|
||||
private func updateStatus() {
|
||||
#if !targetEnvironment(simulator) && !canImport(PlaygroundSupport)
|
||||
#if !targetEnvironment(simulator)
|
||||
let manager = NEDNSSettingsManager.shared()
|
||||
manager.loadFromPreferences {
|
||||
if let err = $0 {
|
||||
|
|
@ -84,7 +84,7 @@ struct ContentView {
|
|||
self.usedID = server.id.uuidString
|
||||
}
|
||||
|
||||
#if !targetEnvironment(simulator) && !canImport(PlaygroundSupport)
|
||||
#if !targetEnvironment(simulator)
|
||||
let manager = NEDNSSettingsManager.shared()
|
||||
manager.dnsSettings = server.configuration.toDNSSettings()
|
||||
manager.onDemandRules = server.onDemandRules.toNEOnDemandRules()
|
||||
|
|
@ -108,7 +108,7 @@ struct ContentView {
|
|||
private func removeSettings() {
|
||||
self.usedID = nil
|
||||
|
||||
#if !targetEnvironment(simulator) && !canImport(PlaygroundSupport)
|
||||
#if !targetEnvironment(simulator)
|
||||
let manager = NEDNSSettingsManager.shared()
|
||||
guard manager.dnsSettings != nil else {
|
||||
// Already removed
|
||||
|
|
@ -133,6 +133,7 @@ struct ContentView {
|
|||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
extension ContentView: View {
|
||||
var body: some View {
|
||||
if #available(iOS 16, *) {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ struct DetailView {
|
|||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
extension DetailView: View {
|
||||
var body: some View {
|
||||
if #available(iOS 16, *) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// swift-tools-version: 5.8
|
||||
// swift-tools-version: 6.0
|
||||
|
||||
// WARNING:
|
||||
// This file is automatically generated.
|
||||
|
|
|
|||
Loading…
Reference in a new issue