Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix Xcode version checks and manifests #177

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
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
12 changes: 7 additions & 5 deletions UnoCheck/Checkups/XCodeCheckup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public NuGetVersion ExactVersion
public string ExactVersionName
=> Manifest?.Check?.XCode?.ExactVersionName;

public NuGetVersion Version
=> ExactVersion ?? MinimumVersion;

public string VersionName
=> ExactVersionName ?? MinimumVersionName ?? ExactVersion?.ToString() ?? MinimumVersion?.ToString();

Expand Down Expand Up @@ -67,7 +70,7 @@ public override Task<DiagnosticResult> Examine(SharedState history)
}

// Selected version is good
ReportStatus($"Xcode.app ({VersionName})", Status.Ok);
ReportStatus($"Xcode.app ({selected.VersionString} {selected.BuildVersion})", Status.Ok);
return Task.FromResult(DiagnosticResult.Ok(this));
}

Expand Down Expand Up @@ -101,12 +104,12 @@ public override Task<DiagnosticResult> Examine(SharedState history)
}


ReportStatus($"Xcode.app ({VersionName}) not installed.", Status.Error);
ReportStatus($"Xcode.app ({Version} {VersionName}) not installed.", Status.Error);

return Task.FromResult(new DiagnosticResult(
Status.Error,
this,
new Suggestion($"Download XCode {VersionName}")));
new Suggestion($"Download XCode {Version} {VersionName}")));
}
catch(InvalidDataException)
{
Expand Down Expand Up @@ -177,11 +180,10 @@ XCodeInfo GetXcodeInfo(string path, bool selected)
if (File.Exists(versionPlist))
{
NSDictionary rootDict = (NSDictionary)PropertyListParser.Parse(versionPlist);
string cfBundleVersion = rootDict.ObjectForKey("CFBundleVersion")?.ToString();
string cfBundleShortVersion = rootDict.ObjectForKey("CFBundleShortVersionString")?.ToString();
string productBuildVersion = rootDict.ObjectForKey("ProductBuildVersion")?.ToString();

if (NuGetVersion.TryParse(cfBundleVersion, out var v))
if (NuGetVersion.TryParse(cfBundleShortVersion, out var v))
return new XCodeInfo(v, cfBundleShortVersion, productBuildVersion, path, selected);
}
else
Expand Down
4 changes: 2 additions & 2 deletions manifests/uno.ui-preview-major.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
}
},
"xcode": {
"exactVersion": "14E300c",
"exactVersionName": "14.3.1"
"exactVersion": "15.0",
"exactVersionName": "15A240d"
},
"vswin": {
"minimumVersion": "17.8.0-pre.1"
Expand Down
4 changes: 2 additions & 2 deletions manifests/uno.ui-preview.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
}
},
"xcode": {
"exactVersion": "14E300c",
"exactVersionName": "14.3.1"
"exactVersion": "14.3.1",
"exactVersionName": "14E300c"
},
"vswin": {
"minimumVersion": "17.4.4"
Expand Down
4 changes: 2 additions & 2 deletions manifests/uno.ui.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
}
},
"xcode": {
"exactVersion": "14E300c",
"exactVersionName": "14.3.1"
"exactVersion": "14.3.1",
"exactVersionName": "14E300c"
},
"vswin": {
"minimumVersion": "17.4.4"
Expand Down
Loading