Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4672a7f028 | ||
|
|
19bd0836d6 | ||
|
|
c35002a671 | ||
|
|
6fb3fadc6e | ||
|
|
8cb414a906 | ||
|
|
a2f3dbac3c | ||
|
|
8fa723ef79 | ||
|
|
665c721bfd | ||
|
|
bd59579501 |
+1
-1
@@ -1,3 +1,3 @@
|
||||
[submodule "Packages/SwiftCLI-2.0.3"]
|
||||
path = Packages/SwiftCLI-2.0.3
|
||||
url = https://Lord-Kamina@github.com/Lord-Kamina/SwiftCLI
|
||||
url = https://github.com/Lord-Kamina/SwiftCLI
|
||||
|
||||
+1
-1
Submodule Packages/SwiftCLI-2.0.3 updated: 18ead68e46...8bd038b3fe
@@ -1,3 +1,6 @@
|
||||
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
|
||||
========
|
||||
|
||||
@@ -7,9 +10,37 @@ 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
|
||||
|
||||
To install, double click on the .prefpane, and you will be prompted to install it.
|
||||
To uninstall, simply Ctrl+Click on the Prefpane icon and remove it, or move the .prefpane file to the Trash.
|
||||
|
||||
* Download latest release from https://github.com/Lord-Kamina/SwiftDefaultApps/releases
|
||||
* To install, double click on the `.prefpane`, and you will be prompted to install it.
|
||||
* To uninstall, simply Ctrl+Click on the Prefpane icon and remove it, or move the `.prefpane` file to the Trash.
|
||||
|
||||
## Installting with brew
|
||||
|
||||
Run:
|
||||
|
||||
```bash
|
||||
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:
|
||||
|
||||
```bash
|
||||
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
|
||||
|
||||
@@ -22,6 +53,12 @@ The user-interface should be pretty self-explanatory; but, there are some things
|
||||
- The second is **"Other..."**, which obviously will allow you to select an application not in the list; with a caveat. In recent versions of macOS, the LaunchServices have become quite a bit smarter under the hood than they used to be. In practice, what this means is that although you can choose *any* application to handle anything, only valid associations will be preserved, as the LaunchServices is permanently looking for invalid or stale associations and removing them.
|
||||
- One final note: In the URI Schemes tab, you have the option of adding a custom URI Scheme (Removing them on demand is neither possible nor necessary, due to the same thing explained above). This options is provided for completeness' sake; you should virtually never need to use it, since Launch Services should be able to properly detect any valid URL Handlers. As a further cautionary note: If you add a custom URI Scheme when it is not needed, you may not be able to remove it except by uninstalling and reinstalling SwiftDefaultApps. Why? Because new schemes are by default associated to *"Do Nothing", which means Launch Services will always find a valid handler as long as SwiftDefaultApps is installed.
|
||||
|
||||
### 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
|
||||
|
||||
- Using jakeheis' SwiftCLI 2.0 as a base for the CLI version located inside the bundle. (https://github.com/jakeheis/SwiftCLI)
|
||||
@@ -34,13 +71,16 @@ The user-interface should be pretty self-explanatory; but, there are some things
|
||||
- Gears designed by Freepik (http://www.freepik.com/free-vector/gray-background-of-gear_956712.htm)
|
||||
|
||||
## Current Version
|
||||
- Version: 2.0.1
|
||||
- Date: 2019-07-26
|
||||
|
||||
- Version: 2.0.1
|
||||
- Date: 2019-07-26
|
||||
|
||||
## Known Issues
|
||||
-
|
||||
|
||||
See https://github.com/Lord-Kamina/SwiftDefaultApps/issues
|
||||
|
||||
## TO DO
|
||||
|
||||
- Localizations
|
||||
|
||||
# Release Notes
|
||||
@@ -91,5 +131,3 @@ The user-interface should be pretty self-explanatory; but, there are some things
|
||||
+ Initial release!
|
||||
+ ### Changed
|
||||
+ ### Fixed
|
||||
|
||||
|
||||
|
||||
@@ -359,7 +359,7 @@ class LSWrappers {
|
||||
- Parameter outBundleID: This parameter is populated with a bundle identifier if a valid application bundle corresponding to the input parameter was found.
|
||||
- Returns: A status-code. `0` on success, or a value corresponding to various possible errors.
|
||||
*/
|
||||
static func getBundleID (_ inParam: String, outBundleID: inout String? = nil) -> OSStatus {
|
||||
static func getBundleID (_ inParam: String, outBundleID: inout String?) -> OSStatus {
|
||||
var errCode = OSStatus()
|
||||
let filemanager = FileManager.default
|
||||
if (inParam == "None") { // None is a valid value for our dummy application.
|
||||
|
||||
Reference in New Issue
Block a user