Lord-Kamina / SwiftDefaultApps

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

Switching to "Do Nothing" doesn't work #12

Closed lucassz closed 2 years ago

lucassz commented 5 years ago

I installed the application using brew cask on Mac OS 10.14.3, and am able to access the prefpane and change default handlers from one app to another. However, if I press "Do Nothing", both radio buttons appear selected:

Screen Shot 2019-03-31 at 3 51 18 PM

And if I switch to another tab and then switch back, the original app is still selected:

Screen Shot 2019-03-31 at 3 51 21 PM

In Console.app, I find the following error: default 15:51:12.677201 -0400 System Preferences cl.fail.lordkamina.ThisAppDoesNothing is not a valid application.

Lord-Kamina commented 5 years ago

This is a known issue due to ThisAppDoesNothing.app not being signed and also never having been launched before. I am working on it and a fix should be out soon-ish. In the meantime, you should be able to fine the app inside the Resources folder in the prefpane package, if you launch it once via Control+click > Open, it should work from there onward.

lucassz commented 5 years ago

Thank you, that does fix the issue. While I'm at it, can I ask if there's any other utility that would allow me to find the (rather complicated) UTI of a given file that I have?

Lord-Kamina commented 5 years ago

I'm not sure to which extent that's actually possible. UTIs are basically abstractions built on top of file extensions, MIME types and other stuff. Some of them have been defined by Apple or other vendors but for unusual ones, mostly it's app themselves that should define them in their Info.plist.

Check this reference for more info: https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_intro/understand_utis_intro.html#//apple_ref/doc/uid/TP40001319-CH201-SW1

tcyrus commented 5 years ago

Quick way to force ThisAppDoesNothing.app to launch.

open ~/Library/PreferencePanes/SwiftDefaultApps.prefPane/Contents/Resources/ThisAppDoesNothing.app
eexit commented 4 years ago

Thanks @tcyrus for the trick 👍

The path was wrong however but I guess it depends if you install the pref pane for your user or all users. My all-user path was: /Library/PreferencePanes/SwiftDefaultApps.prefPane/Contents/Resources/ThisAppDoesNothing.app

I tried un-quarantine the file but did not work, it worked only after I opened the app!