Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit d48eae9

Browse files
committed
now uses correct seed catalog URL for current OS
1 parent 02720ae commit d48eae9

2 files changed

Lines changed: 22 additions & 5 deletions

File tree

FetchInstallerPkg.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@
373373
CODE_SIGN_IDENTITY = "Apple Development";
374374
CODE_SIGN_STYLE = Automatic;
375375
COMBINE_HIDPI_IMAGES = YES;
376-
CURRENT_PROJECT_VERSION = 26;
376+
CURRENT_PROJECT_VERSION = 27;
377377
DEVELOPMENT_ASSET_PATHS = "\"FetchInstallerPkg/Preview Content\"";
378378
DEVELOPMENT_TEAM = JME5BW3F3R;
379379
ENABLE_APP_SANDBOX = YES;
@@ -409,7 +409,7 @@
409409
CODE_SIGN_IDENTITY = "Apple Development";
410410
CODE_SIGN_STYLE = Automatic;
411411
COMBINE_HIDPI_IMAGES = YES;
412-
CURRENT_PROJECT_VERSION = 26;
412+
CURRENT_PROJECT_VERSION = 27;
413413
DEVELOPMENT_ASSET_PATHS = "\"FetchInstallerPkg/Preview Content\"";
414414
DEVELOPMENT_TEAM = JME5BW3F3R;
415415
ENABLE_APP_SANDBOX = YES;

FetchInstallerPkg/Model/SeedProgram.swift

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77

88
import Foundation
99

10-
// Note: this will be different for Monterey
11-
let defaultCatalog = "https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog"
10+
let suCatalogs = [
11+
11: "https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog",
12+
12: "https://swscan.apple.com/content/catalogs/others/index-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog"
13+
]
1214

1315
enum SeedProgram: String, CaseIterable, Identifiable {
1416
case customerSeed = "CustomerSeed"
@@ -18,11 +20,26 @@ enum SeedProgram: String, CaseIterable, Identifiable {
1820

1921
var id: String {self.rawValue}
2022
}
23+
24+
// return the default catalog URL for the current version of macOS
25+
func defaultCatalog() -> URL? {
26+
let majorVersion = ProcessInfo.processInfo.operatingSystemVersion.majorVersion
27+
28+
var catalog = ""
29+
switch majorVersion {
30+
case 11:
31+
catalog = "https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog"
32+
default:
33+
catalog = "https://swscan.apple.com/content/catalogs/others/index-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog"
34+
}
2135

36+
return URL(string: catalog)
37+
}
38+
2239
func catalogURL(for seed: SeedProgram) -> URL {
2340
let seedPath = "/System/Library/PrivateFrameworks/Seeding.framework/Resources/SeedCatalogs.plist"
2441

25-
var catalogURL = URL(string: defaultCatalog)!
42+
var catalogURL = defaultCatalog()!
2643

2744
let seedPathURL = URL(fileURLWithPath: seedPath)
2845
// read plist file

0 commit comments

Comments
 (0)