diff --git a/Xcodes.xcodeproj/project.pbxproj b/Xcodes.xcodeproj/project.pbxproj index 336a4bb..ffdde88 100644 --- a/Xcodes.xcodeproj/project.pbxproj +++ b/Xcodes.xcodeproj/project.pbxproj @@ -1058,7 +1058,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; @@ -1253,7 +1253,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; @@ -1311,7 +1311,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; diff --git a/Xcodes/Frontend/Common/NavigationSplitViewWrapper.swift b/Xcodes/Frontend/Common/NavigationSplitViewWrapper.swift index 120cd77..92dafff 100644 --- a/Xcodes/Frontend/Common/NavigationSplitViewWrapper.swift +++ b/Xcodes/Frontend/Common/NavigationSplitViewWrapper.swift @@ -20,29 +20,16 @@ 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: 290, ideal: 290) - } else { - sidebar - } - } detail: { - detail - } - .navigationSplitViewStyle(.balanced) - } else { - // Alternative code for earlier versions of OS. - NavigationView { - // The first column is the sidebar. + NavigationSplitView { + if #available(macOS 14, *) { + sidebar + .navigationSplitViewColumnWidth(min: 290, ideal: 290) + } else { sidebar - .frame(minWidth: 300) - detail } - .navigationViewStyle(.columns) + } detail: { + detail } + .navigationSplitViewStyle(.balanced) } } diff --git a/Xcodes/Frontend/MainWindow.swift b/Xcodes/Frontend/MainWindow.swift index ee04d21..e89c4b3 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)) }