From f62c5139f047480f35005d909c88658ef704cf0a Mon Sep 17 00:00:00 2001 From: Daniel Chick Date: Mon, 11 Mar 2024 21:51:12 -0500 Subject: [PATCH 1/3] Correct inconsistency in minimum supported version --- Xcodes.xcodeproj/project.pbxproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Xcodes.xcodeproj/project.pbxproj b/Xcodes.xcodeproj/project.pbxproj index 4523900..e822983 100644 --- a/Xcodes.xcodeproj/project.pbxproj +++ b/Xcodes.xcodeproj/project.pbxproj @@ -1054,7 +1054,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MACOSX_DEPLOYMENT_TARGET = 12.0; + MACOSX_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -1249,7 +1249,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MACOSX_DEPLOYMENT_TARGET = 12.0; + MACOSX_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -1307,7 +1307,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MACOSX_DEPLOYMENT_TARGET = 12.0; + MACOSX_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = macosx; From 4394c48e11ee97866c266b9ea32a5e543c312ff5 Mon Sep 17 00:00:00 2001 From: Daniel Chick Date: Mon, 11 Mar 2024 21:51:35 -0500 Subject: [PATCH 2/3] Remove outdated version checks --- .../Common/NavigationSplitViewWrapper.swift | 30 ++++++------------- Xcodes/Frontend/MainWindow.swift | 6 +--- Xcodes/XcodesApp.swift | 6 +--- 3 files changed, 11 insertions(+), 31 deletions(-) diff --git a/Xcodes/Frontend/Common/NavigationSplitViewWrapper.swift b/Xcodes/Frontend/Common/NavigationSplitViewWrapper.swift index 594c811..a07d16f 100644 --- a/Xcodes/Frontend/Common/NavigationSplitViewWrapper.swift +++ b/Xcodes/Frontend/Common/NavigationSplitViewWrapper.swift @@ -20,29 +20,17 @@ struct NavigationSplitViewWrapper: View where Sidebar: View, De } var body: some View { - if #available(iOS 16, macOS 13, tvOS 16, watchOS 9, visionOS 1, *) { - // Use the latest API available - NavigationSplitView { - - if #available(macOS 14, *) { - sidebar - .navigationSplitViewColumnWidth(min: 250, ideal: 300) - } else { - sidebar - } - } detail: { - detail - } - .navigationSplitViewStyle(.balanced) - } else { - // Alternative code for earlier versions of OS. - NavigationView { - // The first column is the sidebar. + // Use the latest API available + NavigationSplitView { + if #available(macOS 14, *) { + sidebar + .navigationSplitViewColumnWidth(min: 250, ideal: 300) + } else { sidebar - .frame(minWidth: 250) - detail } - .navigationViewStyle(.columns) + } detail: { + detail } + .navigationSplitViewStyle(.balanced) } } diff --git a/Xcodes/Frontend/MainWindow.swift b/Xcodes/Frontend/MainWindow.swift index 88b301d..7b020ad 100644 --- a/Xcodes/Frontend/MainWindow.swift +++ b/Xcodes/Frontend/MainWindow.swift @@ -55,11 +55,7 @@ struct MainWindow: View { .help("PreferencesDescription") } else { Button(action: { - if #available(macOS 13, *) { - NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil) - } else { - NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil) - } + NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil) }, label: { Label("Preferences", systemImage: "gearshape") }) diff --git a/Xcodes/XcodesApp.swift b/Xcodes/XcodesApp.swift index 611341b..67247f4 100644 --- a/Xcodes/XcodesApp.swift +++ b/Xcodes/XcodesApp.swift @@ -169,9 +169,5 @@ class AppDelegate: NSObject, NSApplicationDelegate { } func localizeString(_ key: String, comment: String = "") -> String { - if #available(macOS 12, *) { - return String(localized: String.LocalizationValue(key)) - } else { - return NSLocalizedString(key, comment: comment) - } + return String(localized: String.LocalizationValue(key)) } From 74d8f395a5e8176884782dbd80e9399c37c80370 Mon Sep 17 00:00:00 2001 From: Daniel Chick Date: Mon, 11 Mar 2024 21:54:20 -0500 Subject: [PATCH 3/3] Remove comment --- Xcodes/Frontend/Common/NavigationSplitViewWrapper.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Xcodes/Frontend/Common/NavigationSplitViewWrapper.swift b/Xcodes/Frontend/Common/NavigationSplitViewWrapper.swift index a07d16f..24bfeda 100644 --- a/Xcodes/Frontend/Common/NavigationSplitViewWrapper.swift +++ b/Xcodes/Frontend/Common/NavigationSplitViewWrapper.swift @@ -20,7 +20,6 @@ struct NavigationSplitViewWrapper: View where Sidebar: View, De } var body: some View { - // Use the latest API available NavigationSplitView { if #available(macOS 14, *) { sidebar