Feature/privileged helper file ops - #847
Open
abiligiri wants to merge 7 commits into
Open
Conversation
Ports moveApp/createSymbolicLink/rename/remove from developer_id onto current HelperXPCProtocol (now Sendable) and adds FileOperations.swift implementing them.
…ileged helper Adds usePrivilegedHelperForFileOperations preference and wires HelperClient's new moveApp/createSymbolicLink/rename/remove methods into AppState's select, createSymbolicLink, renameToXcode, and uninstall flows, gated behind the toggle. Falls back to direct FileManager operations (via FileOperations/XcodeSelectionFilesystemService) when the toggle is off.
Points the XcodesKit package dependency at abiligiri/XcodesKit async-move-item-for-helper branch, which makes XcodeUnarchiveService.MoveItem async so the post-unarchive move into /Applications can go through Current.helper.moveAppAsync when usePrivilegedHelperForFileOperations is enabled. This is a temporary fork pin; the corresponding XcodesKit change should be upstreamed to XcodesOrg/XcodesKit and this pinned back to a released version once merged.
Uninstall now permanently deletes files instead of moving to Trash, and the delete can take a noticeable number of seconds with zero visual feedback in the row/detail pane. Sets installState to .uninstalling at the start of AppState.uninstall(xcode:) and resets it on failure; on success the existing post-uninstall updateInstalledXcodesAsync() recompute already clears it back to .notInstalled. Requires the XcodesKit fork's new .uninstalling(Path) case (abiligiri/XcodesKit@fbee0cd).
…ileOperations strings The xcstrings.yml CI check requires every key to have translations for all 18 supported languages (ca, de, el, es, fi, fr, hi, it, ja, ko, nl, pl, pt-BR, ru, tr, uk, zh-Hans, zh-Hant), and these two new keys were English-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note that this requires a change in XcodesOrg/XcodesKit#7 to be merged. I will update the Swift Package reference here to XcodesOrg/XcodesKit once that is merged.
These changes allow XcodesApp to be used by non-admin user to install and manage versions of Xcode on enterprise systems where the privileged helper is installed and run as admin.