Skip to content

Add standalone macOS Xcode extension - #5702

Merged
Marc-André Moreau (mamoreau-devolutions) merged 2 commits into
mainfrom
xcode-extension
Nov 12, 2026
Merged

Marc-André Moreau (mamoreau-devolutions) merged 2 commits into
mainfrom
xcode-extension

Conversation

@mamoreau-devolutions

@mamoreau-devolutions Marc-André Moreau (mamoreau-devolutions) commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor
  • I have read the contributing guidelines, and I agree with the Code of Conduct.
  • Have you checked that there aren't other open pull requests for the same changes?
  • Have you tested that the committed code can be executed without errors?
  • Have you confirmed that this issue is caused by UniGetUI itself, and not by the package manager or the package involved?
    If the same issue can be reproduced outside UniGetUI with the relevant package manager or with the package itself, please report it there first. UniGetUI should only be used to track issues that are specific to UniGetUI's behavior or integration.
image

Summary

Adds an optional, off-by-default Xcode extension on macOS 13+ (Settings > Extensions > Xcode) for browsing, downloading, installing, updating, and switching between side-by-side Xcode versions and Simulator runtimes — implemented natively in standalone C# (src/UniGetUI.Extensions.Xcode) with no external xcodes CLI or Xcodes.app dependency.

  • macOS-only build & runtime gating (EnableXcodeExtension / UNIGETUI_XCODE_EXTENSION): Enabled by default when building on macOS or targeting osx-* RIDs, excluded from UniGetUI.Windows.slnx, and stripped from Windows and Linux builds (UniGetUI.Avalonia.csproj, Directory.Build.props, AppExtensions).
  • Native Apple authentication & Keychain isolation (AppleAuth/):
    • Implements Apple SRP (s2k / s2k_fo), hashcash proof-of-work, and trusted-device / SMS 2FA sign-in in C# using source-generated JSON metadata (AppleAuthJsonContext).
    • Isolates authenticated requests through /usr/bin/curl -q over stdin (AppleCurlTransport) with an empty environment and RFC 6265 cookie handling so credentials, tokens, cookies, and URLs stay out of .NET HTTP diagnostics, process arguments, and environment variables.
    • Stores credentials and cookies under UniGetUI's own login Keychain service (com.devolutions.unigetui.xcode), never reading other tools' Keychain items. Uses unencrypted Keychain item attributes (kSecReturnAttributes + kSecAttrGeneric) for account status and external-change checks so startup and browsing never trigger a Keychain prompt; secrets are unlocked at most once when an Apple operation runs.
  • Catalog, downloads, installation, and selection (Local/):
    • Combines the Xcode Releases feed (xcodereleases.com) with Apple's authenticated download catalog (listDownloads.action), including ADCDownloadAuth cookie authorization and automatic re-authentication if Apple's developer download session expires (resultCode: 1100).
    • Supports resumable .xip and .xip.aea archive downloads (XcodeArchiveDownloader) verified by SHA-1 / strong ETag validators and guarded by per-cache file locks.
    • Unpacks archives into staging (xip / aa), verifies build identity, Apple code-signing authority, and Gatekeeper (spctl), names side-by-side bundles (Xcode-26.6.app, build-disambiguated when needed), and runs privileged xcode-select / DevToolsSecurity / _developer group / license / first-launch setup (XcodeArchiveInstaller, XcodeSelector).
  • Simulator runtimes: Lists installed and bundled runtimes (xcrun simctl) alongside Apple's downloadable catalog, supporting xcodebuild -downloadPlatform, runtime .dmg export, and direct public CDN .dmg downloads.
  • Avalonia UI, Settings, and IPC:
    • Responsive master/detail Xcode page with flat and grouped version browsers, release/architecture/Installed only filters, active/installed header summary pill with click-to-focus, macOS compatibility warnings, scheduled update checks, and opt-in automatic updates.
    • Shared Apple ID card (XcodeAccountCard), dedicated settings page (XcodeSettings), and CLI/IPC support (unigetui app navigate xcode, documented in docs/CLI.md).
    • Includes src/UniGetUI.Extensions.Xcode/THIRD_PARTY_NOTICES.md attributing MIT-licensed XcodesOrg/xcodes, XcodesOrg/XcodesKit, XcodesOrg/XcodesApp, and blacktop/ipsw (test vectors).

Testing

  • Xcode engine & auth suite (UniGetUI.Extensions.Xcode.Tests): 718 passed, 0 failed (including live macOS Keychain round-trip tests with UNIGETUI_KEYCHAIN_TESTS=1 and loopback TLS curl transport tests).
  • UI & settings search suite (XcodeTests, SettingsSearchIndexTests): 375 passed, 0 failed (covering browser filtering/grouping, installed summary & focus flows, account/Keychain states, prompts, simulator runtimes, live-region safety, and responsive layout bounds).
  • Formatting & translations:
    • dotnet format whitespace src --folder --verify-no-changes --verbosity minimal passed.
    • dotnet format style src/UniGetUI.Avalonia.slnx --no-restore --verify-no-changes --verbosity minimal passed.
    • pwsh ./scripts/translation/Verify-Translations.ps1 validated all 60 language files.
  • Build, NativeAOT, and live verification: Verified osx-arm64 and osx-x64 NativeAOT publishes, linux-x64 / EnableXcodeExtension=false builds excluding UniGetUI.Extensions.Xcode, and interactive live testing in UniGetUI.app on macOS (Apple ID + SMS 2FA sign-in, deferred Keychain behavior, and authenticated Apple download handshake).

Known Limitations

  • Accounts requiring hardware security keys (FIDO2/WebAuthn) or enterprise federated sign-in are not supported yet and fail closed with clear guidance.
  • Selecting an Xcode bundle that is already the active xcode-select target verifies its Apple code signature before returning without re-running privileged directory ownership/ACL remediation.
  • Terminal UI (unigetui tui) does not include an Xcode page.

Closes: N/A
Relates to: N/A

@mamoreau-devolutions
Marc-André Moreau (mamoreau-devolutions) marked this pull request as ready for review November 12, 2026 18:43
@mamoreau-devolutions Marc-André Moreau (mamoreau-devolutions) changed the title Add Xcode install and update extension for macOS Add standalone macOS Xcode extension Nov 12, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@mamoreau-devolutions
Marc-André Moreau (mamoreau-devolutions) merged commit 07300b2 into main Nov 12, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant