Skip to content

Add environment check APIs#160

Open
rmarinho wants to merge 2 commits intomainfrom
feature/environment-check
Open

Add environment check APIs#160
rmarinho wants to merge 2 commits intomainfrom
feature/environment-check

Conversation

@rmarinho
Copy link
Member

Summary

Add EnvironmentChecker that performs a comprehensive check of the Apple development environment by aggregating results from CommandLineTools, XcodeManager, and RuntimeService.

Changes

New files

  • Xamarin.MacDev/EnvironmentChecker.cs — Comprehensive environment check: Xcode, CLT, runtimes, platform SDKs, license validation, first-launch support
  • tests/EnvironmentCheckerTests.cs — 10 tests for platform name mapping

Included dependencies (from other PRs, will merge cleanly)

How it works

  1. Check() — Runs all checks and populates EnvironmentCheckResult with derived status
  2. IsXcodeLicenseAccepted()xcodebuild -license check (from ClientTools.Platform)
  3. RunFirstLaunch()xcodebuild -runFirstLaunch (from ClientTools.Platform)
  4. Platform detection from Xcode SDK directories (iPhoneOS→iOS, XROS→visionOS, etc.)

Closes #148

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

Add EnvironmentChecker that performs a comprehensive check of the Apple
development environment by aggregating results from CommandLineTools,
XcodeManager, and RuntimeService.

Includes Xcode license validation (xcodebuild -license check) and
first-launch support (xcodebuild -runFirstLaunch), patterns from
ClientTools.Platform iOSSshCommandsExtensions.

Also maps platform SDK directory names to friendly names (e.g.
iPhoneOS -> iOS, XROS -> visionOS).

Includes dependencies from PRs #156, #157, #159 which will merge
cleanly when those PRs land first.

Closes #148

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rmarinho added a commit that referenced this pull request Feb 27, 2026
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 XcodeManager.Select path normalization, HashSet dedup,
and SimctlOutputParser JsonException handling.

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 Apple environment check API (maui apple check)

1 participant