Skip to content

Commit 7359ae1

Browse files
authored
Merge pull request #527 from chickdan/remove_outdated_version_checks
Remove outdated version checks
2 parents c09b560 + 238f974 commit 7359ae1

File tree

4 files changed

+13
-34
lines changed

4 files changed

+13
-34
lines changed

Xcodes.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@
10581058
GCC_WARN_UNUSED_FUNCTION = YES;
10591059
GCC_WARN_UNUSED_VARIABLE = YES;
10601060
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
1061-
MACOSX_DEPLOYMENT_TARGET = 12.0;
1061+
MACOSX_DEPLOYMENT_TARGET = 13.0;
10621062
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
10631063
MTL_FAST_MATH = YES;
10641064
ONLY_ACTIVE_ARCH = YES;
@@ -1253,7 +1253,7 @@
12531253
GCC_WARN_UNUSED_FUNCTION = YES;
12541254
GCC_WARN_UNUSED_VARIABLE = YES;
12551255
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
1256-
MACOSX_DEPLOYMENT_TARGET = 12.0;
1256+
MACOSX_DEPLOYMENT_TARGET = 13.0;
12571257
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
12581258
MTL_FAST_MATH = YES;
12591259
ONLY_ACTIVE_ARCH = YES;
@@ -1311,7 +1311,7 @@
13111311
GCC_WARN_UNUSED_FUNCTION = YES;
13121312
GCC_WARN_UNUSED_VARIABLE = YES;
13131313
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
1314-
MACOSX_DEPLOYMENT_TARGET = 12.0;
1314+
MACOSX_DEPLOYMENT_TARGET = 13.0;
13151315
MTL_ENABLE_DEBUG_INFO = NO;
13161316
MTL_FAST_MATH = YES;
13171317
SDKROOT = macosx;

Xcodes/Frontend/Common/NavigationSplitViewWrapper.swift

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,16 @@ struct NavigationSplitViewWrapper<Sidebar, Detail>: View where Sidebar: View, De
2020
}
2121

2222
var body: some View {
23-
if #available(iOS 16, macOS 13, tvOS 16, watchOS 9, visionOS 1, *) {
24-
// Use the latest API available
25-
NavigationSplitView {
26-
27-
if #available(macOS 14, *) {
28-
sidebar
29-
.navigationSplitViewColumnWidth(min: 290, ideal: 290)
30-
} else {
31-
sidebar
32-
}
33-
} detail: {
34-
detail
35-
}
36-
.navigationSplitViewStyle(.balanced)
37-
} else {
38-
// Alternative code for earlier versions of OS.
39-
NavigationView {
40-
// The first column is the sidebar.
23+
NavigationSplitView {
24+
if #available(macOS 14, *) {
25+
sidebar
26+
.navigationSplitViewColumnWidth(min: 290, ideal: 290)
27+
} else {
4128
sidebar
42-
.frame(minWidth: 300)
43-
detail
4429
}
45-
.navigationViewStyle(.columns)
30+
} detail: {
31+
detail
4632
}
33+
.navigationSplitViewStyle(.balanced)
4734
}
4835
}

Xcodes/Frontend/MainWindow.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,7 @@ struct MainWindow: View {
5555
.help("PreferencesDescription")
5656
} else {
5757
Button(action: {
58-
if #available(macOS 13, *) {
59-
NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil)
60-
} else {
61-
NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil)
62-
}
58+
NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil)
6359
}, label: {
6460
Label("Preferences", systemImage: "gearshape")
6561
})

Xcodes/XcodesApp.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,5 @@ class AppDelegate: NSObject, NSApplicationDelegate {
169169
}
170170

171171
func localizeString(_ key: String, comment: String = "") -> String {
172-
if #available(macOS 12, *) {
173-
return String(localized: String.LocalizationValue(key))
174-
} else {
175-
return NSLocalizedString(key, comment: comment)
176-
}
172+
return String(localized: String.LocalizationValue(key))
177173
}

0 commit comments

Comments
 (0)