Skip to content

Add Apple install orchestrator#161

Open
rmarinho wants to merge 2 commits intomainfrom
feature/apple-install
Open

Add Apple install orchestrator#161
rmarinho wants to merge 2 commits intomainfrom
feature/apple-install

Conversation

@rmarinho
Copy link
Member

Summary

Add AppleInstaller that orchestrates Apple development environment setup by checking the current state and installing missing components.

Changes

New files

  • Xamarin.MacDev/AppleInstaller.cs — Orchestrator: checks environment, installs CLT, runs first-launch, downloads runtimes
  • tests/AppleInstallerTests.cs — 6 tests for constructor validation and DeriveStatus logic
  • tests/EnvironmentCheckerTests.cs — 10 tests for platform name mapping

Included dependencies (from other PRs, will merge cleanly)

How it works

  1. Runs EnvironmentChecker.Check() for initial state
  2. If CLT missing → xcode-select --install
  3. If Xcode found → xcodebuild -runFirstLaunch
  4. For each requested platform without a runtime → RuntimeService.DownloadPlatform()
  5. Re-checks and returns final EnvironmentCheckResult

Supports dryRun mode that logs planned actions without executing.

Closes #152

Depends on: PRs #156, #157, #158, #159, #160 (merge those first)

rmarinho and others added 2 commits February 27, 2026 19:42
Add AppleInstaller that checks the current Apple development environment
and installs missing components:

- Command Line Tools (via xcode-select --install)
- Xcode first-launch packages (via xcodebuild -runFirstLaunch)
- Simulator runtimes (via RuntimeService.DownloadPlatform)

Supports dry-run mode for reporting planned actions without changes.
Includes EnvironmentChecker, CommandLineTools, XcodeManager,
RuntimeService, and SimctlOutputParser dependencies from PRs #156-#160.

Closes #152

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fix issues found by GPT-5.2, Gemini 3 Pro, and Claude Sonnet 4.5:

- XcodeManager.Select: normalize .app bundle path to Developer
  directory before calling xcode-select -s (GPT-5.2)
- AppleInstaller.EnsureCommandLineTools: use absolute path
  /usr/bin/xcode-select instead of PATH resolution (GPT-5.2)
- SimctlOutputParser: catch JsonException on malformed simctl JSON
  to return partial results instead of crashing (Sonnet 4.5)
- XcodeManager.FindXcodeApps: use HashSet for O(1) dedup instead
  of List.Contains O(n) (Sonnet 4.5)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add JSON-serializable output models for all Apple APIs

1 participant