Feature: support current user's Application directory#41
Conversation
|
Thanks for the PR! This is a useful addition — Homebrew installs casks to One small thing: could you also add a de-duplication check? If the same app exists in both Other than that, looks good! |
|
I’m trying to think if there is a good reason an application would exist in both places- it is certainly an edge case. If so, then it may make more sense to clarify which location the application is found, as opposed to deduplication (which would, in effect, leave the user with no option to select the intended application). Should the picker instead be updated to expose the location in addition to the application name and bundle identifier? |
|
I modified AppPickerView to include the path. Have a look at the latest commit. |
…o Protected Applications view in Settings window
|
Good point about showing the path instead of deduplication — makes sense, the user can decide which one they want. I spotted one bug though: the path concatenation is missing a FileManager.default.homeDirectoryForCurrentUser.path() + "Applications"This would resolve to something like FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent("Applications").pathOr at minimum add the slash explicitly. Also one minor UX thought — showing both path and bundle identifier on every row is a lot of text. Maybe just show the path? The bundle ID is mainly useful for debugging, and path already tells you where the app lives. Up to you though, not a blocker. Fix the path bug and this is good to merge! |
|
Interestingly enough… in my first commit I did have a leading slash for “Applications” but it resulted in a double slash (no negative effects that I saw during testing). I’ve taken the suggestion with the path, as well as changing the output by removing the bundle identifier. The path will be displayed in both the App picker as well as the pane in the Settings window. |


Summary
Support applications in the current user's Applications directory.
Changes