Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tools/siminstaller/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ static bool TryExecuteAndCapture (string filename, string arguments, out string
}
}

static string GetIndexUrl (string xcodeVersion, string xcodeUuid)
=> xcodeVersion switch {
"14.0.0" => "https://devimages-cdn.apple.com/downloads/xcode/simulators/index2.dvtdownloadableindex",
_ => $"https://devimages-cdn.apple.com/downloads/xcode/simulators/index-{xcodeVersion}-{xcodeUuid}.dvtdownloadableindex"
};

public static int Main (string [] args)
{
var exit_code = 0;
Expand Down Expand Up @@ -134,7 +140,7 @@ public static int Main (string [] args)

xcodeVersion = xcodeVersion.Insert (xcodeVersion.Length - 2, ".");
xcodeVersion = xcodeVersion.Insert (xcodeVersion.Length - 1, ".");
var url = $"https://devimages-cdn.apple.com/downloads/xcode/simulators/index-{xcodeVersion}-{xcodeUuid}.dvtdownloadableindex";
var url = GetIndexUrl (xcodeVersion, xcodeUuid);
var uri = new Uri (url);
var tmpfile = Path.Combine (TempDirectory, Path.GetFileName (uri.LocalPath));
if (!File.Exists (tmpfile)) {
Expand Down