[siminstaller] Update to not require Xcode's Info.plist to have a DVTPlugInCompatibilityUUID entry.

This commit is contained in:
Rolf Bjarne Kvinge 2024-06-25 14:24:03 +02:00
Родитель 89dd543575
Коммит 1074e5814b
1 изменённых файлов: 1 добавлений и 7 удалений

Просмотреть файл

@ -128,20 +128,14 @@ namespace xsiminstaller {
if (!TryExecuteAndCapture (out var xcodeVersion, "/usr/libexec/PlistBuddy", $"-c", "Print :DTXcode", plist))
return 1;
xcodeVersion = xcodeVersion.Trim ();
if (!TryExecuteAndCapture (out var xcodeUuid, "/usr/libexec/PlistBuddy", "-c", "Print :DVTPlugInCompatibilityUUID", plist))
return 1;
xcodeUuid = xcodeUuid.Trim ();
xcodeVersion = xcodeVersion.Insert (xcodeVersion.Length - 2, ".");
xcodeVersion = xcodeVersion.Insert (xcodeVersion.Length - 1, ".");
var indexName = $"index-{xcodeVersion}-{xcodeUuid}.dvtdownloadableindex";
var indexName = $"index-{xcodeVersion}.dvtdownloadableindex";
var tmpfile = Path.Combine (TempDirectory, indexName);
if (!File.Exists (tmpfile)) {
// Try multiple urls
var urls = new string [] {
$"https://devimages-cdn.apple.com/downloads/xcode/simulators/{indexName}",
/*
* The following url was found while debugging Xcode, the "index2" part is actually hardcoded:
*