Skip to content

2.0.0

Choose a tag to compare

@trispo trispo released this 17 Nov 21:02
· 16 commits to master since this release

xcinfo 2.0.0 is a rewrite of most of the tool: a new sign-in to Apple, a full-screen terminal UI, Apple Encrypted Archives, safer installs and uninstalls, and output that works in scripts.

Highlights

  • Sign-in works again. Apple moved its developer sign-in to SRP with a hashcash challenge, which 1.x could not do. xcinfo now signs in like Xcode, with two-factor authentication, and the password never leaves the Mac. Apple also removed the configuration endpoint 1.x used for its service key; xcinfo now reads the key from Apple's sign-out redirect.
  • Full-screen terminal UI. xcinfo tui, or plain xcinfo in a terminal, lists installed, available and not installable versions with their details. Install, download, uninstall and switch run inside the view, with dialogs for questions and a panel for progress.
  • .aea archives. Xcode 27.3 and later also come as Apple Encrypted Archives. Signed archives are checked against Apple's certificate chain and extracted with AppleArchive; other profiles use archiveutil on macOS 15 and later.
  • Safer installs. Archives are checked against the SHA-1 from xcodereleases.com, existing downloads are verified and reused, a download stopped with Ctrl-C resumes on the next run, and uninstall moves Xcode to the Trash.
  • Scripts and CI. --json, --quiet, --non-interactive, documented exit codes, and running as root without sudo.

New commands

  • xcinfo download <version>: downloads the archive without installing
  • xcinfo extract <archive>: extracts a .xip or .aea
  • xcinfo switch [<version>]: points /Applications/Xcode.app to another installed Xcode and selects it with xcode-select
  • xcinfo tui: the full-screen view

New options

  • --json, -q/--quiet, --non-interactive on every command
  • --archive-path (was --xip-path) and --preserve-archive (was --preserve-xip); the old names still work
  • --archive-format xip|aea, --overwrite, --no-verify, --prevent-sleep (was --no-sleep, which still works)
  • --apple-silicon and --universal for versions with two downloads
  • --delete-permanently for uninstall
  • --no-symlink and --no-xcode-select for switch as for install

Changes you may notice

  • Requirements: macOS 13 or later; building from source needs Swift 6.4.
  • Keychain: 1.x kept the Apple ID, the password and the session in three Keychain items (xcinfo.appleid, xcinfo.session, xcinfo.cookies). 2.0 keeps one item, xcinfo, with the account name and the session, never the password. The first run moves the account name and session over and deletes the old items, the stored password included. Expect one new sign-in with two-factor authentication, and one macOS prompt to allow access to the new item.
  • Versions: 26.6 means the final release, not 26.6 RC 2; 26 is the newest final 26.x. Release candidates and betas are chosen by name (26.6 RC 2) or build number. xcinfo says which version it took. latest is still the newest entry on xcodereleases.com, betas included.
  • Apple silicon and Universal: versions with two downloads are labelled in list, info and the terminal UI, and download and install take the one that fits this Mac.
  • Uninstall: moves Xcode to the Trash after asking with its full path; --delete-permanently deletes it right away.
  • Exit codes: failures have their own codes instead of 1: 3 version not found, 4 sign-in failed, 5 download failed, 6 extraction failed, 7 installation failed, 8 uninstallation failed, 9 xcodereleases.com or cache unavailable, 10 an answer was needed but could not be asked, 64 invalid arguments, 130 Ctrl-C, 143 SIGTERM.
  • Output: status on standard output; questions, warnings and errors on standard error. Colours only on a terminal and never with NO_COLOR. Piped progress prints every 10 %.
  • Extraction: .xip archives are always extracted with the built-in unxip. The old PackageKit path is gone, and --use-system-unxip is accepted but does nothing.

Fixed issues

  • #33 Authentication with Apple failed
  • #34 Failed to build with Swift 6
  • #22 Add a switch command
  • #14 Illegal hardware instruction from xcinfo installed without an installed Xcode
  • Related: #31 and #23 (interrupted downloads keep their progress and resume on the next run) and #15 (--non-interactive and XCINFO_APPLE_ID / XCINFO_APPLE_PASSWORD; a separate command to store the credentials is still open)

Known limits

Checked by hand: a fresh sign-in with SRP (s2k) and two-factor codes from a trusted device, session reuse, download with pause and resume, install into a test folder from the command line and from the terminal UI, signed .aea extraction of Xcode 27.3 beta 2, uninstall to the Trash.

Not yet checked live:

  • the s2k_fo password protocol, two-factor codes by text message, and accounts without two-factor authentication
  • the archiveutil fallback for .aea archives that are not signed-only, and install --archive-path with an .aea
  • downloading and installing on an Intel Mac
  • a run as root and a fully unattended install with --non-interactive

Homebrew and Mint still install 1.x until their formulas are updated.