Skip to content

Commit 8f7ba01

Browse files
authored
Merge pull request #97 from kkebo/swift-6-language-mode
2 parents 03f8802 + 76de00f commit 8f7ba01

10 files changed

Lines changed: 15 additions & 17 deletions

DNSecure.xcodeproj/project.pbxproj

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285
attributes = {
286286
BuildIndependentTargetsInParallel = YES;
287287
LastSwiftUpdateCheck = 1200;
288-
LastUpgradeCheck = 1510;
288+
LastUpgradeCheck = 1620;
289289
TargetAttributes = {
290290
8940023724ACBD2700EBE74B = {
291291
CreatedOnToolsVersion = 12.0;
@@ -547,7 +547,7 @@
547547
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
548548
SUPPORTS_MACCATALYST = YES;
549549
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
550-
SWIFT_VERSION = 5.0;
550+
SWIFT_VERSION = 6.0;
551551
TARGETED_DEVICE_FAMILY = "1,2";
552552
};
553553
name = Debug;
@@ -574,15 +574,14 @@
574574
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
575575
SUPPORTS_MACCATALYST = YES;
576576
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
577-
SWIFT_VERSION = 5.0;
577+
SWIFT_VERSION = 6.0;
578578
TARGETED_DEVICE_FAMILY = "1,2";
579579
};
580580
name = Release;
581581
};
582582
8940026124ACBD2800EBE74B /* Debug */ = {
583583
isa = XCBuildConfiguration;
584584
buildSettings = {
585-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
586585
BUNDLE_LOADER = "$(TEST_HOST)";
587586
CODE_SIGN_STYLE = Automatic;
588587
DEVELOPMENT_TEAM = X4678G5DL2;
@@ -603,7 +602,6 @@
603602
8940026224ACBD2800EBE74B /* Release */ = {
604603
isa = XCBuildConfiguration;
605604
buildSettings = {
606-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
607605
BUNDLE_LOADER = "$(TEST_HOST)";
608606
CODE_SIGN_STYLE = Automatic;
609607
DEVELOPMENT_TEAM = X4678G5DL2;
@@ -624,7 +622,6 @@
624622
8940026424ACBD2800EBE74B /* Debug */ = {
625623
isa = XCBuildConfiguration;
626624
buildSettings = {
627-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
628625
CODE_SIGN_STYLE = Automatic;
629626
DEVELOPMENT_TEAM = X4678G5DL2;
630627
INFOPLIST_FILE = DNSecureUITests/Info.plist;
@@ -644,7 +641,6 @@
644641
8940026524ACBD2800EBE74B /* Release */ = {
645642
isa = XCBuildConfiguration;
646643
buildSettings = {
647-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
648644
CODE_SIGN_STYLE = Automatic;
649645
DEVELOPMENT_TEAM = X4678G5DL2;
650646
INFOPLIST_FILE = DNSecureUITests/Info.plist;

DNSecure.xcodeproj/xcshareddata/xcschemes/DNSecure.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1510"
3+
LastUpgradeVersion = "1620"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

DNSecure/Extensions/NEOnDemandRuleAction+CaseIterable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import NetworkExtension
99

10-
extension NEOnDemandRuleAction: CaseIterable {
10+
extension NEOnDemandRuleAction: @retroactive CaseIterable {
1111
public static var allCases: [Self] {
1212
[.connect, .disconnect, .evaluateConnection, .ignore]
1313
}

DNSecure/Extensions/NEOnDemandRuleAction+CustomStringConvertible.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import NetworkExtension
99

10-
extension NEOnDemandRuleAction: CustomStringConvertible {
10+
extension NEOnDemandRuleAction: @retroactive CustomStringConvertible {
1111
public var description: String {
1212
switch self {
1313
case .connect:

DNSecure/Extensions/NEOnDemandRuleInterfaceType+CaseIterable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import NetworkExtension
99

10-
extension NEOnDemandRuleInterfaceType: CaseIterable {
10+
extension NEOnDemandRuleInterfaceType: @retroactive CaseIterable {
1111
public static var allCases: [Self] {
1212
#if os(macOS)
1313
return [.any, .ethernet, .wiFi]

DNSecure/Extensions/NEOnDemandRuleInterfaceType+CustomStringConvertible.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import NetworkExtension
99

10-
extension NEOnDemandRuleInterfaceType: CustomStringConvertible {
10+
extension NEOnDemandRuleInterfaceType: @retroactive CustomStringConvertible {
1111
public var description: String {
1212
switch self {
1313
case .any:

DNSecure/Models/Resolver.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ extension Resolvers {
215215
}
216216
}
217217

218-
extension Resolvers: RawRepresentable {
218+
extension Resolvers: @retroactive RawRepresentable {
219219
public init?(rawValue: String) {
220220
guard let data = rawValue.data(using: .utf8),
221221
let result = try? JSONDecoder().decode(Self.self, from: data)

DNSecure/Views/ContentView.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ struct ContentView {
6666
}
6767

6868
private func updateStatus() {
69-
#if !targetEnvironment(simulator) && !canImport(PlaygroundSupport)
69+
#if !targetEnvironment(simulator)
7070
let manager = NEDNSSettingsManager.shared()
7171
manager.loadFromPreferences {
7272
if let err = $0 {
@@ -84,7 +84,7 @@ struct ContentView {
8484
self.usedID = server.id.uuidString
8585
}
8686

87-
#if !targetEnvironment(simulator) && !canImport(PlaygroundSupport)
87+
#if !targetEnvironment(simulator)
8888
let manager = NEDNSSettingsManager.shared()
8989
manager.dnsSettings = server.configuration.toDNSSettings()
9090
manager.onDemandRules = server.onDemandRules.toNEOnDemandRules()
@@ -108,7 +108,7 @@ struct ContentView {
108108
private func removeSettings() {
109109
self.usedID = nil
110110

111-
#if !targetEnvironment(simulator) && !canImport(PlaygroundSupport)
111+
#if !targetEnvironment(simulator)
112112
let manager = NEDNSSettingsManager.shared()
113113
guard manager.dnsSettings != nil else {
114114
// Already removed
@@ -133,6 +133,7 @@ struct ContentView {
133133
}
134134
}
135135

136+
@MainActor
136137
extension ContentView: View {
137138
var body: some View {
138139
if #available(iOS 16, *) {

DNSecure/Views/DetailView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ struct DetailView {
1919
}
2020
}
2121

22+
@MainActor
2223
extension DetailView: View {
2324
var body: some View {
2425
if #available(iOS 16, *) {

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 5.8
1+
// swift-tools-version: 6.0
22

33
// WARNING:
44
// This file is automatically generated.

0 commit comments

Comments
 (0)