Skip to content

Feature Request: Make --latest Select the Latest Compatible Xcode #479

Description

@williamkey123

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:

xcodes install --latest

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:

xcodes install --latest

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions