From 288976827901a9c786289d01c0cf37343ed042d2 Mon Sep 17 00:00:00 2001 From: 82Flex <82flex@gmail.com> Date: Sat, 13 Jan 2024 13:37:04 +0800 Subject: [PATCH] backport: remove support for iOS 14 Signed-off-by: 82Flex <82flex@gmail.com> --- Reveil.xcodeproj/project.pbxproj | 31 +++++-------------- .../xcshareddata/swiftpm/Package.resolved | 22 ++----------- Reveil/ContentView.swift | 7 ++--- Reveil/Pages/DashboardView.swift | 5 ++- .../Pages/Details/FileSystemsListView.swift | 3 +- .../Details/NetworkDetailsListView.swift | 2 +- .../Details/NetworkInterfacesListView.swift | 3 +- Reveil/Pages/DetailsListView.swift | 7 ++--- Reveil/Pages/SecurityView.swift | 3 +- Reveil/Views/Dashboard/CheckmarkWidget.swift | 5 ++- Reveil/Views/Details/FieldCell.swift | 1 - Reveil/Views/Details/ToastView.swift | 1 - 12 files changed, 23 insertions(+), 67 deletions(-) diff --git a/Reveil.xcodeproj/project.pbxproj b/Reveil.xcodeproj/project.pbxproj index e126e51..9708099 100644 --- a/Reveil.xcodeproj/project.pbxproj +++ b/Reveil.xcodeproj/project.pbxproj @@ -118,7 +118,6 @@ CC549F072AFA9F1800219CF8 /* EntryUpdater.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC549F062AFA9F1800219CF8 /* EntryUpdater.swift */; }; CC5AE1BB2AD1A4420087F082 /* SocketAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC5AE1BA2AD1A4420087F082 /* SocketAddress.swift */; }; CC5AE1BF2AD2F2010087F082 /* ifaddrs_safe.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC5AE1BE2AD2F2010087F082 /* ifaddrs_safe.swift */; }; - CC7C87942B4C459300B6A639 /* SwiftUIBackports in Frameworks */ = {isa = PBXBuildFile; productRef = CC7C87932B4C459300B6A639 /* SwiftUIBackports */; }; CC7DC2912AF3EB1300D50EDC /* library_stub.h in Headers */ = {isa = PBXBuildFile; fileRef = CC7DC2902AF3EB1300D50EDC /* library_stub.h */; settings = {ATTRIBUTES = (Public, ); }; }; CC7DC29B2AF3EBD600D50EDC /* library_stub.m in Sources */ = {isa = PBXBuildFile; fileRef = CC7DC29A2AF3EBD600D50EDC /* library_stub.m */; }; CC7DC29D2AF3ECA500D50EDC /* library_stub.zip in Resources */ = {isa = PBXBuildFile; fileRef = CC7DC29C2AF3ECA500D50EDC /* library_stub.zip */; }; @@ -371,7 +370,6 @@ CC3F942F2B5240A300E67A19 /* ColorfulX in Frameworks */, CCD54D2C2AD9047D007ED1AF /* Collections in Frameworks */, CCA0956D2AE8D5E900F5E55F /* UIKit.framework in Frameworks */, - CC7C87942B4C459300B6A639 /* SwiftUIBackports in Frameworks */, CCD54D2E2AD9047D007ED1AF /* DequeModule in Frameworks */, 5024F6EC2B1829EE000CEAB5 /* library_stub.framework in Frameworks */, CCA0956F2AE8D5EE00F5E55F /* SwiftUI.framework in Frameworks */, @@ -826,7 +824,6 @@ CCD54D2F2AD9047D007ED1AF /* OrderedCollections */, 0F08193C2ADAF1C600BB626C /* DictionaryCoder */, CC7DC2A02AF3EEBB00D50EDC /* ZIPFoundation */, - CC7C87932B4C459300B6A639 /* SwiftUIBackports */, CC3F942E2B5240A300E67A19 /* ColorfulX */, ); productName = Reveil; @@ -887,7 +884,6 @@ 0F08193B2ADAF1C600BB626C /* XCRemoteSwiftPackageReference "DictionaryCoder" */, CC7DC29F2AF3EEBB00D50EDC /* XCRemoteSwiftPackageReference "ZIPFoundation" */, 0FA065832B3D8436000A7ECE /* XCRemoteSwiftPackageReference "swift-argument-parser" */, - CC7C87922B4C459300B6A639 /* XCRemoteSwiftPackageReference "SwiftUIBackports" */, CC3F942D2B5240A300E67A19 /* XCRemoteSwiftPackageReference "ColorfulX" */, ); productRefGroup = CC4AE2B52ACAA4B400DA23AC /* Products */; @@ -1143,7 +1139,7 @@ ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MACOSX_DEPLOYMENT_TARGET = 11.0; + MACOSX_DEPLOYMENT_TARGET = 12.0; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; @@ -1162,7 +1158,7 @@ ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MACOSX_DEPLOYMENT_TARGET = 11.0; + MACOSX_DEPLOYMENT_TARGET = 12.0; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SWIFT_VERSION = 5.0; @@ -1314,7 +1310,7 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1357,7 +1353,7 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1393,7 +1389,7 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "@executable_path/Frameworks", "@loader_path/Frameworks", @@ -1441,7 +1437,7 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "@executable_path/Frameworks", "@loader_path/Frameworks", @@ -1531,17 +1527,9 @@ CC3F942D2B5240A300E67A19 /* XCRemoteSwiftPackageReference "ColorfulX" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/Lakr233/ColorfulX.git"; - requirement = { - branch = "bugfix/displaylink-memory-leaks"; - kind = branch; - }; - }; - CC7C87922B4C459300B6A639 /* XCRemoteSwiftPackageReference "SwiftUIBackports" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/shaps80/SwiftUIBackports.git"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 2.8.0; + minimumVersion = 2.3.0; }; }; CC7DC29F2AF3EEBB00D50EDC /* XCRemoteSwiftPackageReference "ZIPFoundation" */ = { @@ -1578,11 +1566,6 @@ package = CC3F942D2B5240A300E67A19 /* XCRemoteSwiftPackageReference "ColorfulX" */; productName = ColorfulX; }; - CC7C87932B4C459300B6A639 /* SwiftUIBackports */ = { - isa = XCSwiftPackageProductDependency; - package = CC7C87922B4C459300B6A639 /* XCRemoteSwiftPackageReference "SwiftUIBackports" */; - productName = SwiftUIBackports; - }; CC7DC2A02AF3EEBB00D50EDC /* ZIPFoundation */ = { isa = XCSwiftPackageProductDependency; package = CC7DC29F2AF3EEBB00D50EDC /* XCRemoteSwiftPackageReference "ZIPFoundation" */; diff --git a/Reveil.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Reveil.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 16d56c3..ab8c112 100644 --- a/Reveil.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Reveil.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/Lakr233/ColorfulX.git", "state" : { - "branch" : "bugfix/displaylink-memory-leaks", - "revision" : "019149d122448193471a94e85df0e4f943e3dc5f" + "revision" : "a422557a7c2cac7c6348f6a650dfa08260e6c4e6", + "version" : "2.3.0" } }, { @@ -45,24 +45,6 @@ "version" : "1.0.6" } }, - { - "identity" : "swiftbackports", - "kind" : "remoteSourceControl", - "location" : "https://github.com/shaps80/SwiftBackports", - "state" : { - "revision" : "ddca6a237c1ba2291d5a3cc47ec8480ce6e9f805", - "version" : "1.0.3" - } - }, - { - "identity" : "swiftuibackports", - "kind" : "remoteSourceControl", - "location" : "https://github.com/shaps80/SwiftUIBackports.git", - "state" : { - "revision" : "3042f0cf4b9f0d5b0bb08ad17f742a43bc4fdfc5", - "version" : "2.8.0" - } - }, { "identity" : "zipfoundation", "kind" : "remoteSourceControl", diff --git a/Reveil/ContentView.swift b/Reveil/ContentView.swift index a960964..420390f 100644 --- a/Reveil/ContentView.swift +++ b/Reveil/ContentView.swift @@ -7,7 +7,6 @@ import UIKit import SwiftUI -import SwiftUIBackports struct ContentView: View { @Environment(\.horizontalSizeClass) private var horizontalSizeClass @@ -67,7 +66,7 @@ struct SidebarView: View { var body: some View { NavigationView { List { - Backport.Section(NSLocalizedString("DASHBOARD", comment: "Dashboard")) { + Section(NSLocalizedString("DASHBOARD", comment: "Dashboard")) { NavigationLink { DashboardView() .navigationTitle(NSLocalizedString("DASHBOARD", comment: "Dashboard")) @@ -77,11 +76,11 @@ struct SidebarView: View { } } - Backport.Section(NSLocalizedString("DETAILS", comment: "Details")) { + Section(NSLocalizedString("DETAILS", comment: "Details")) { DetailsView.createDetailsList() } - Backport.Section(NSLocalizedString("ABOUT", comment: "About")) { + Section(NSLocalizedString("ABOUT", comment: "About")) { NavigationLink { AboutView() .background(ColorfulBackground()) diff --git a/Reveil/Pages/DashboardView.swift b/Reveil/Pages/DashboardView.swift index 2bab40e..eae9fae 100644 --- a/Reveil/Pages/DashboardView.swift +++ b/Reveil/Pages/DashboardView.swift @@ -6,7 +6,6 @@ // import SwiftUI -import SwiftUIBackports struct DashboardView: View { @StateObject private var viewModel = Dashboard.shared @@ -31,11 +30,11 @@ struct DashboardView: View { .foregroundColor(Color(PlatformColor.secondarySystemBackgroundAlias)) .opacity(0.25) ) - .backport.overlay { + .overlay { RoundedRectangle(cornerRadius: 4) .stroke(Color(PlatformColor.separatorAlias), lineWidth: 1) } - .backport.overlay { navigationLinkBuilder(entry) } + .overlay { navigationLinkBuilder(entry) } } .padding(entry === viewModel.entries.last ? .bottom : [], 8) .listSectionSeparator(hidden: true) diff --git a/Reveil/Pages/Details/FileSystemsListView.swift b/Reveil/Pages/Details/FileSystemsListView.swift index 8dea9b5..cdcb623 100644 --- a/Reveil/Pages/Details/FileSystemsListView.swift +++ b/Reveil/Pages/Details/FileSystemsListView.swift @@ -6,7 +6,6 @@ // import SwiftUI -import SwiftUIBackports struct FileSystemsListView: View, ModuleListView { let module: Module = FileSystems.shared @@ -19,7 +18,7 @@ struct FileSystemsListView: View, ModuleListView { } } - @Environment(\.backportDismiss) private var dismissAction + @Environment(\.dismiss) private var dismissAction @State var items: [FileSystem] = [] diff --git a/Reveil/Pages/Details/NetworkDetailsListView.swift b/Reveil/Pages/Details/NetworkDetailsListView.swift index 61aea93..81ab2c0 100644 --- a/Reveil/Pages/Details/NetworkDetailsListView.swift +++ b/Reveil/Pages/Details/NetworkDetailsListView.swift @@ -14,7 +14,7 @@ struct NetworkDetailsListView: View, ModuleListView { init?(entryKey _: EntryKey) { nil } - @Environment(\.backportDismiss) private var dismissAction + @Environment(\.dismiss) private var dismissAction @State var items: [NetworkPrefix] = [] diff --git a/Reveil/Pages/Details/NetworkInterfacesListView.swift b/Reveil/Pages/Details/NetworkInterfacesListView.swift index a4983b4..17e081b 100644 --- a/Reveil/Pages/Details/NetworkInterfacesListView.swift +++ b/Reveil/Pages/Details/NetworkInterfacesListView.swift @@ -6,7 +6,6 @@ // import SwiftUI -import SwiftUIBackports struct NetworkInterfacesListView: View, ModuleListView { let module: Module = NetworkInterfaces.shared @@ -19,7 +18,7 @@ struct NetworkInterfacesListView: View, ModuleListView { } } - @Environment(\.backportDismiss) private var dismissAction + @Environment(\.dismiss) private var dismissAction @State var items: [NetworkInterface] = [] diff --git a/Reveil/Pages/DetailsListView.swift b/Reveil/Pages/DetailsListView.swift index 0bcf7cd..829c544 100644 --- a/Reveil/Pages/DetailsListView.swift +++ b/Reveil/Pages/DetailsListView.swift @@ -6,7 +6,6 @@ // import SwiftUI -import SwiftUIBackports struct DetailsListView: View, FieldCellDelegate { let basicEntries: [BasicEntry] @@ -16,7 +15,7 @@ struct DetailsListView: View, FieldCellDelegate { private let pasteboard = UIPasteboard.general - @Environment(\.backportDismiss) private var dismissAction + @Environment(\.dismiss) private var dismissAction @EnvironmentObject private var highlightedEntryKey: HighlightedEntryKey @State private var selectedEntryKey: EntryKey? @@ -54,7 +53,7 @@ struct DetailsListView: View, FieldCellDelegate { } .listStyle(.plain) .frame(maxWidth: .infinity) - .backport.overlay(alignment: .bottom) { toastOverlay() } + .overlay(alignment: .bottom) { toastOverlay() } .onAppear { if let object = highlightedEntryKey.object { selectedEntryKeys.removeAll(keepingCapacity: true) @@ -121,7 +120,7 @@ struct DetailsListView: View, FieldCellDelegate { } .listSectionSeparator(hidden: true) } else { - Backport.Section(entryGroup.title) { + Section(entryGroup.title) { sectionBuilder(entryGroup.entries) } .listSectionSeparator(hidden: true) diff --git a/Reveil/Pages/SecurityView.swift b/Reveil/Pages/SecurityView.swift index 50ac2b6..2f637b1 100644 --- a/Reveil/Pages/SecurityView.swift +++ b/Reveil/Pages/SecurityView.swift @@ -6,12 +6,11 @@ // import SwiftUI -import SwiftUIBackports struct SecurityView: View { @StateObject private var securityModel = Security.shared - @Environment(\.backportDismiss) private var dismissAction + @Environment(\.dismiss) private var dismissAction var body: some View { DetailsListView(basicEntries: securityModel.basicEntries) diff --git a/Reveil/Views/Dashboard/CheckmarkWidget.swift b/Reveil/Views/Dashboard/CheckmarkWidget.swift index e1eb4ac..3530d2f 100644 --- a/Reveil/Views/Dashboard/CheckmarkWidget.swift +++ b/Reveil/Views/Dashboard/CheckmarkWidget.swift @@ -7,7 +7,6 @@ import ColorfulX import SwiftUI -import SwiftUIBackports struct CheckmarkWidget: View { @StateObject var securityModel: Security = .shared @@ -99,7 +98,7 @@ struct CheckmarkWidget: View { } .frame(maxWidth: .infinity, alignment: .leading) .padding(.all, 12) - .backport.background { + .background { if usesLegacyStyle { RoundedRectangle(cornerRadius: 4) .foregroundColor(backgroundColor) @@ -110,7 +109,7 @@ struct CheckmarkWidget: View { .clipShape(RoundedRectangle(cornerRadius: 4)) } } - .backport.overlay { + .overlay { if usesLegacyStyle && !isInsecure { RoundedRectangle(cornerRadius: 4) .stroke(Color(PlatformColor.separatorAlias), lineWidth: 1) diff --git a/Reveil/Views/Details/FieldCell.swift b/Reveil/Views/Details/FieldCell.swift index 22b4e92..853c162 100644 --- a/Reveil/Views/Details/FieldCell.swift +++ b/Reveil/Views/Details/FieldCell.swift @@ -6,7 +6,6 @@ // import SwiftUI -import SwiftUIBackports private struct FieldCell_Internal: View { let label: String diff --git a/Reveil/Views/Details/ToastView.swift b/Reveil/Views/Details/ToastView.swift index cd76467..bf91361 100644 --- a/Reveil/Views/Details/ToastView.swift +++ b/Reveil/Views/Details/ToastView.swift @@ -6,7 +6,6 @@ // import SwiftUI -import SwiftUIBackports struct ToastView: View { let label: String