62 Commits
Author SHA1 Message Date
Andrew Udvare a2f3dbac3c Fix Swift error 2022-08-06 19:33:25 -04:00
Gregorio Litenstein 0dd7b0be76 SwiftDefaultApps CLI: Fix “Illegal instruction: 4”
Fix crash caused by forcedly unwrapping some optionals when printing the results of a command.
2019-07-26 00:43:46 -04:00
Gregorio Litenstein f4010abe44 Re-indent 2019-06-17 00:51:05 -04:00
Gregorio Litenstein 41733bf973 Little clean-up of SWDAHandlersModel. 2019-06-17 00:51:05 -04:00
Gregorio Litenstein 10288a3810 Prefpane main: Kill arbitrary timer
Override didSelect() instead to load content when first launched.
2019-06-17 00:51:05 -04:00
Gregorio Litenstein 3a09834f5a Better error management + refactoring
- Implement a function to determine at runtime whether we’re running in CLI or as a prefpane.
- More verbose errors in both cases.
- Try to account for ThisAppDoesNothing appearing unknown to LaunchServices by manually trying to launch it from one of several locations it might be found. (Should fix #9 and #12)
- Fold all errors and success messages into a single displayAlert() function used both in CLI and GUI versions.
2019-06-17 00:51:04 -04:00
Gregorio Litenstein 224d24e260 LSWrappers: Refactoring and minor optimization.
- Account for some additional errors (as well as no error)
- Sort error cases (sort of) by their value
- Add some extra info to LSerror.print
- Minor code clean-up
2019-06-17 00:46:23 -04:00
Gregorio Litenstein 28f21667d2 Updated the SynchronizedArray code. 2019-06-17 00:46:23 -04:00
Gregorio Litenstein dcafe50852 Text Fixes.
- Replaced URL with URI where appropriate.
- Fixed some typos
- Updated README (and corrected the attribution of the SynchronizedArray code)
2019-06-17 00:46:23 -04:00
Gregorio Litenstein c8d961c035 Take care of some compiler warnings. 2019-06-17 00:46:23 -04:00
Gregorio Litenstein 9e4ca7d54f Some clean-up and renames
Renamed SWDAMainPRefpane.swift to main.swift, CLI app from lsreg to swda and renamed asset catalog.
2019-06-17 00:46:22 -04:00
Gregorio Litenstein 122a639bea Update to Swift 5 2019-03-30 11:48:05 -03:00
Gregorio Litenstein 4695232d57 SWDAApplicationInfo: Guard for bundleIdentifier!
Intended to fix odd occurrences of crashes when unwrapping.
2018-11-15 10:34:54 -03:00
Gregorio Litenstein d2bc612822 Migrate to Swift 4.2 2018-10-07 23:29:04 -03:00
Gregorio Litenstein 5e3c0eeae6 Change couple of things deprecated in Swift 4.1 2018-04-15 12:20:38 -07:00
Gregorio Litenstein 8e66dde290 Update to Swift 4 2017-09-26 22:51:25 -03:00
Gregorio Litenstein 733478d23c Fix CLI tool. 2017-09-26 22:47:18 -03:00
Gregorio Litenstein ff4310315a Comment-out a debug line. 2017-09-26 17:49:50 -03:00
Gregorio Litenstein 51dd274be0 Fix unwrapped Optional in result string. 2017-09-26 17:49:20 -03:00
Gregorio Litenstein 1c89ca3696 Initial commit of what should be a fully functional GUI. 2017-05-01 00:15:48 -03:00
Gregorio Litenstein 69540855cc Minor refactoring, add support functions for GUI. 2017-05-01 00:14:50 -03:00
Gregorio Litenstein c978084066 Clean up. 2017-05-01 00:13:55 -03:00
Gregorio Litenstein 6b75bbe2a9 Add role option to the CLI. 2017-05-01 00:12:56 -03:00
Gregorio Litenstein 52775c08ce Some more refactoring, tyding up folder structure. 2017-05-01 00:11:20 -03:00
Gregorio Litenstein 0cebe63881 Typo. 2017-03-28 21:27:47 -03:00
Gregorio Litenstein 9d8aeabacb Replace “None” with dummy app
Add switch to toggle between returning bundle-ids and application paths.
2017-03-28 21:27:42 -03:00
Gregorio Litenstein 49c45b700d Remove some forced-unwrapping. 2017-03-28 21:26:21 -03:00
Gregorio Litenstein c08f4fc257 Account for Finder’s distinct bundle type. 2017-03-20 18:59:51 -03:00
Gregorio Litenstein 95a22d7dcb Output UTIs/URLs handled as nested Dictionary.
Also, make sure to list each item only once.
2017-03-16 23:29:17 -03:00
Gregorio Litenstein 02747843b7 Avoid implicitly unwrapping BundleID 2017-03-16 23:26:45 -03:00
Gregorio Litenstein c7c8b3a27e Clean-up and corrected typo. 2017-03-16 23:26:18 -03:00
Gregorio Litenstein 92c3542843 Move sorting of UTIs out of the back-end. 2017-03-16 23:25:39 -03:00
Gregorio Litenstein fc11fb955b Make Launch Services Wrappers static. 2017-03-16 23:24:34 -03:00
Gregorio Litenstein ad997d0c0e More changes to account for new workspace. 2017-03-16 23:19:11 -03:00
Gregorio Litenstein 3f2f1dc02c Properly analyze apps that use file extensions. 2017-03-02 15:28:53 -03:00
Gregorio Litenstein 10fe50d6a3 Schemes/Handlers: Return a proper Dictionary. 2017-03-02 15:28:18 -03:00
Gregorio Litenstein e887cf11b0 Some clean-up 2017-03-02 15:27:54 -03:00
Gregorio Litenstein e66e7657b1 Reorganize Workspace 2017-03-02 15:26:06 -03:00
Gregorio Litenstein 61a0843bb5 Prevent occasional errors caused by unwrapping nil 2017-02-05 18:47:31 -03:00
Gregorio Litenstein 59bfa0265f Fixed trying to initialize String with nil. 2017-02-05 17:57:58 -03:00
Gregorio Litenstein af692b1cd0 Fix indentation and properly document functions. 2017-02-05 17:44:08 -03:00
Gregorio Litenstein 50ad040373 Better specify error returned for invalid Bundles. 2017-02-05 17:43:16 -03:00
Gregorio Litenstein 55bcc16982 Optional separator for copyStringArrayAsString()
And some minor clean-up.
2017-02-05 17:42:43 -03:00
Gregorio Litenstein 17cdfb4277 Implement copyExtensionsFor()
A function that creates a list of all file-extensions associated with a given UTI.
2017-02-05 17:39:05 -03:00
Gregorio Litenstein ddbaaecf7f Implement copySchemesAndUTIsForApp()
A function that creates a list of all UTIs and URL Schemes that a given application claims to be able to handle.
2017-02-05 17:37:57 -03:00
Gregorio Litenstein bf79b7c15d Implements getNameForScheme()
A function that attempts to retrieve the display name for an URL Scheme.
2017-02-05 17:35:56 -03:00
Gregorio Litenstein 74df2325ad Move LSErrors over to LSWrappers. 2017-02-05 17:34:51 -03:00
Gregorio Litenstein f55b1bfb28 Implement setHandler command
Implement user-facing command to change a default handler.
2017-02-03 14:08:22 -03:00
Gregorio Litenstein 1c88781a71 Update for OptionGroups. 2017-02-03 14:05:31 -03:00
Gregorio Litenstein bc1f93ea7c Implement getBundleID()
Exhaustive function to get a valid Bundle ID for an application either by URL, by Path, by Bundle ID or by App display name.
Outputs appropriate errors on failure.
2017-02-03 14:05:13 -03:00