Problem
Currently, xcodes install --latest selects the newest available Xcode release regardless of whether it is compatible with the current macOS version.
For example, on macOS Sequoia 15.7.4:
may select Xcode 26.5, then fail because that version requires a newer version of macOS.
From a user perspective, this is surprising. Most users invoking --latest are trying to install the newest version of Xcode they can actually run, not the newest version that exists.
Proposed Solution
Change the behavior of:
to resolve to the newest Xcode version compatible with the current macOS version.
For example:
| Current macOS |
Available Xcodes |
Result |
| Sequoia 15.7.4 |
26.2, 26.3, 26.4, 26.5 |
26.3 |
| Tahoe 26.2 |
26.2, 26.3, 26.4, 26.5 |
26.5 |
This would align with the principle of least surprise and eliminate a common failure mode.
Optional Explicit Flag
For users who intentionally want the newest available version regardless of compatibility, an explicit flag could be provided:
xcodes install --latest-available
or
xcodes install --latest --ignore-compatibility
This would preserve access to the current behavior while making the default behavior more useful.
Why This Helps
- Matches user expectations.
- Reduces installation failures.
- Eliminates the need to manually consult Apple's compatibility matrix.
- Provides a smoother experience when Apple drops support for older macOS versions.
- Still allows power users to explicitly request incompatible versions if desired.
Alternative
If changing the behavior of --latest would be considered a breaking change, consider introducing:
xcodes install --latest-compatible
and deprecating the current behavior over time.
Problem
Currently,
xcodes install --latestselects the newest available Xcode release regardless of whether it is compatible with the current macOS version.For example, on macOS Sequoia 15.7.4:
may select Xcode 26.5, then fail because that version requires a newer version of macOS.
From a user perspective, this is surprising. Most users invoking
--latestare trying to install the newest version of Xcode they can actually run, not the newest version that exists.Proposed Solution
Change the behavior of:
to resolve to the newest Xcode version compatible with the current macOS version.
For example:
This would align with the principle of least surprise and eliminate a common failure mode.
Optional Explicit Flag
For users who intentionally want the newest available version regardless of compatibility, an explicit flag could be provided:
or
This would preserve access to the current behavior while making the default behavior more useful.
Why This Helps
Alternative
If changing the behavior of
--latestwould be considered a breaking change, consider introducing:and deprecating the current behavior over time.