Lord-Kamina / SwiftDefaultApps

Replacement for RCDefaultApps, written in Swift.
Other
1.43k stars 62 forks source link

ANNOUNCEMENT: I have recently noticed Apple has introduced replacements for the deprecated APIs used in this prefpane. As a result, slow as it may be, I plan to resume development. I will be taking PRs as well, if somebody wishes to contribute.

SwiftDefaultApps

This Preference pane is chiefly intended to be a modern replacement for the amazing RCDefaultApp developed way back when by Carl Lindberg, which stopped working in 10.12 due to deprecation of ObjC Garbage collection. Additionally, I guess it was a good way to teach myself Swift.

Feel free to contribute, comment or report issues at https://github.com/Lord-Kamina/SwiftDefaultApps.

Installing & Uninstalling

Installting with brew

Run:

brew install swiftdefaultappsprefpane

then use Spotlight to open the SwiftDefaultApps.prefpane. It will open the System Preferences and you find the app on the bottom of the icons.

How to use the "Do Nothing" app

The Do Nothing dummy app needs to be launched before you can use it in the pref pane. For this, open a terminal and run the following commands:

appDir="/Library/PreferencePanes/SwiftDefaultApps.prefPane/Contents/Resources/ThisAppDoesNothing.app"

if ! [[ -d "$appDir" ]]; then appDir="$HOME/$appDir"; fi

# Remove quanrantine flag
xattr -d com.apple.quarantine "$appDir"
# Open the app
open "$appDir"

After these 2 steps, the Do Nothing app should work when you pick it up.

Usage Notes

This Preference pane will let you view and change default application associations for basically any URI Scheme and/or filetype in macOS. The user-interface should be pretty self-explanatory; but, there are some things that might require an explanation:

How to Find Out File UTI

Run in your terminal the following command (replace my_song.mp3 by your file):

mdls -name kMDItemContentType -name kMDItemContentTypeTree -name kMDItemKind my_song.mp3

Acknowledgments & Attributions

Current Version

Known Issues

See https://github.com/Lord-Kamina/SwiftDefaultApps/issues

TO DO

Release Notes

[2.0.1] - 2019-07-26

[2.0.0] - 2019-06-12

[1.1.3] - 2018-11-15

[1.1.2] - 2018-10-07

[1.1.1] - 2018-04-15

[1.1.0] - 2017-09-27

[1.0.0] - 2017-05-01