You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# NOTE: .NET for iOS/tvOS/MacCatalyst checks the major.minor version of Xcode for version validation.
41
+
# Meanwhile, the available property for us (_RecommendedXcodeVersion) may include a build number like 26.6.1.
42
+
# We strip any patch component so setup-xcode uses semver range matching (bare "26.6" matches any 26.6.x).
43
+
# If we passed the full 3-component version like "26.6.1", Node.js's semver.satisfies would require
44
+
# an exact patch match, which could fail if the runner only has "26.6.0" (or vice versa).
45
+
# This property is more reliable than trying to derive the Xcode version from the workload version number, since the mapping is
46
+
# not always 1:1 (e.g. iOS 26.5 → Xcode 26.6), see https://github.com/dotnet/macios/issues/25818
47
+
XCODE_VERSION=$(dotnet build "Projects/Mobile" -f net10.0-ios -getProperty:_RecommendedXcodeVersion 2>/dev/null | tail -n 1) # Note the project used should have OutputType=Exe, because OutputType=Library has a different version returned
48
+
echo "Recommended Xcode version is $XCODE_VERSION"
49
+
XCODE_VERSION=$(echo "$XCODE_VERSION" | cut -d. -f1-2) # Keep only major.minor
0 commit comments