From 8d9bdc50ff61a5b72b18d7c69e51565d10e52278 Mon Sep 17 00:00:00 2001 From: Mirko Milovanovic Date: Sat, 28 Jun 2025 08:35:21 +0200 Subject: [PATCH] feat: added initial macos tahoe support --- Mist/Model/AppIcon.swift | 3 ++- Mist/Model/CatalogType.swift | 25 +++++++++++++++---- Mist/Model/Firmware.swift | 4 ++- Mist/Model/Installer.swift | 4 ++- .../Settings/SettingsApplicationsView.swift | 1 + 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/Mist/Model/AppIcon.swift b/Mist/Model/AppIcon.swift index 76945fa..d4591c9 100644 --- a/Mist/Model/AppIcon.swift +++ b/Mist/Model/AppIcon.swift @@ -12,8 +12,9 @@ enum AppIcon: String, CaseIterable, Identifiable { case ventura = "Ventura" case sonoma = "Sonoma" case sequoia = "Sequoia" + case tahoe = "Tahoe" - static let `default`: AppIcon = .sequoia + static let `default`: Self = .tahoe var id: String { rawValue diff --git a/Mist/Model/CatalogType.swift b/Mist/Model/CatalogType.swift index 023566b..0400708 100644 --- a/Mist/Model/CatalogType.swift +++ b/Mist/Model/CatalogType.swift @@ -6,6 +6,7 @@ // enum CatalogType: String, CaseIterable, Comparable, Decodable { + case tahoe = "macOS Tahoe" case sequoia = "macOS Sequoia" case sonoma = "macOS Sonoma" case ventura = "macOS Ventura" @@ -22,16 +23,18 @@ enum CatalogType: String, CaseIterable, Comparable, Decodable { private var sortOrder: Int { switch self { - case .sequoia: + case .tahoe: 0 - case .sonoma: + case .sequoia: 1 - case .ventura: + case .sonoma: 2 - case .monterey: + case .ventura: 3 - case .bigSur: + case .monterey: 4 + case .bigSur: + 5 } } @@ -42,6 +45,18 @@ enum CatalogType: String, CaseIterable, Comparable, Decodable { // swiftlint:disable:next cyclomatic_complexity function_body_length func url(for seedType: CatalogSeedType) -> String { switch self { + case .tahoe: + switch seedType { + case .standard: + "https://swscan.apple.com/content/catalogs/others/index-16-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz" + case .customer: + // swiftlint:disable:next line_length + "https://swscan.apple.com/content/catalogs/others/index-16customerseed-16-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz" + case .developer: + "https://swscan.apple.com/content/catalogs/others/index-16seed-16-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz" + case .public: + "https://swscan.apple.com/content/catalogs/others/index-16beta-16-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz" + } case .sequoia: switch seedType { case .standard: diff --git a/Mist/Model/Firmware.swift b/Mist/Model/Firmware.swift index 22690ac..59199d4 100644 --- a/Mist/Model/Firmware.swift +++ b/Mist/Model/Firmware.swift @@ -51,7 +51,9 @@ struct Firmware: Decodable, Hashable, Identifiable { var name: String { var name: String = "" - if version.range(of: "^15", options: .regularExpression) != nil { + if version.range(of: "^16", options: .regularExpression) != nil { + name = "macOS Tahoe" + } else if version.range(of: "^15", options: .regularExpression) != nil { name = "macOS Sequoia" } else if version.range(of: "^14", options: .regularExpression) != nil { name = "macOS Sonoma" diff --git a/Mist/Model/Installer.swift b/Mist/Model/Installer.swift index 028fa5b..898088f 100644 --- a/Mist/Model/Installer.swift +++ b/Mist/Model/Installer.swift @@ -655,7 +655,9 @@ struct Installer: Decodable, Hashable, Identifiable { var name: String { var name: String = "" - if version.range(of: "^15", options: .regularExpression) != nil { + if version.range(of: "^16", options: .regularExpression) != nil { + name = "macOS Tahoe" + } else if version.range(of: "^15", options: .regularExpression) != nil { name = "macOS Sequoia" } else if version.range(of: "^14", options: .regularExpression) != nil { name = "macOS Sonoma" diff --git a/Mist/Views/Settings/SettingsApplicationsView.swift b/Mist/Views/Settings/SettingsApplicationsView.swift index 84d97b8..c26c45a 100644 --- a/Mist/Views/Settings/SettingsApplicationsView.swift +++ b/Mist/Views/Settings/SettingsApplicationsView.swift @@ -10,6 +10,7 @@ import SwiftUI struct SettingsApplicationsView: View { private static let imageNames: [String] = [ + "Application - macOS Tahoe", "Application - macOS Sequoia", "Application - macOS Sonoma", "Application - macOS Ventura",