Skip to content

Add Xcodes.app-compatible Xcode selection modes#166

Open
Redth wants to merge 1 commit intomainfrom
redth/xcode-selection
Open

Add Xcodes.app-compatible Xcode selection modes#166
Redth wants to merge 1 commit intomainfrom
redth/xcode-selection

Conversation

@Redth
Copy link
Copy Markdown
Owner

@Redth Redth commented May 7, 2026

Sherpa's Xcode selection behavior diverged from Xcodes.app and could leave developer tool resolution in a state that broke MAUI builds looking for utilities like ibtool or derq. This change mirrors Xcodes.app's active selection options so users can choose the behavior that matches their environment.

Summary

  • Adds persisted Xcode selection preferences for rename vs none, plus an optional symlink-on-select toggle.
  • Updates the app settings UI to expose the same selection modes as Xcodes.app.
  • Changes XcodeService and the CLI to honor those modes:
    • rename: move the selected bundle to /Applications/Xcode.app and select it.
    • none: leave bundle names unchanged and run /usr/bin/xcode-select -s on the selected bundle path.
    • optional symlink: in none mode, create /Applications/Xcode.app as a symbolic link when it is safe to do so.
  • Keeps the default as rename to preserve the current Sherpa behavior unless the user opts out.

Notes

The symbolic link option intentionally matches Xcodes.app: it creates a plain symlink, not a hard link, and it refuses to replace a real /Applications/Xcode.app bundle.

Validation

  • dotnet test tests/MauiSherpa.Core.Tests/MauiSherpa.Core.Tests.csproj --filter XcodeServiceTests --no-restore
  • dotnet build src/MauiSherpa.Cli/MauiSherpa.Cli.csproj --no-restore
  • dotnet build src/MauiSherpa -f net10.0-maccatalyst --no-restore

Add Xcodes.app-compatible selection modes for renaming, direct selection, and optional symbolic links. Persist the new selection preferences in settings and update the CLI to expose equivalent options.

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.

1 participant