If you can’t use Application Categories in Finder Item Groups to locate your apps easily, is there an alternative you can use? This article suggests some solutions.
The snags with Application Categories are that they’re baked into apps and can’t be added or changed by the user, and the list of categories is fixed and inappropriate for many Mac users. Show apps by Application Categories, and many are just dumped in Other, or into large and vague categories such as Utilities. To improve on this, we must turn to metadata.
macOS provides two specific types of metadata suitable for use to categorise apps: keywords and application categories (yes, confusingly with the same name as those you can’t use in the Info.plist file). These are stored in extended attributes (xattrs) named
com.apple.metadata:kMDItemApplicationCategories respectively. Apps consist of a top-level folder which is an executable bundle containing the signed executable code and other contents. By attaching the appropriate xattr containing keywords or app categories to the app’s top-level folder, with the extension .app, we can use the information there to locate and identify that app in the Finder.
Currently, it’s easier to use keywords, but you’ll discover that they’re also used by other files too. If you want to use metadata which will only be accessed for apps, use application categories if you can.
If you’ve opted to use keywords, you can tag your apps using my free utility SearchKey (not SearchKeyLite, in this case). Open a new window if necessary, click on its Open button to select an app to tag and ensure that you open the .app folder at the top level of the app. Type in the keywords you wish to attach to that app, separating them with commas, and click the Save button.
You can also attach keywords and application categories using my xattr editor xattred. Click on its Open button and select an app to tag, again ensuring that you’re working with the top-level .app folder. To add a new xattr, click on the New button. Paste in either
as appropriate as the name of the xattr you want to add, then switch the popup menu to Property list, and paste in a plist containing your categories or keywords, such as
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
where your text is given as the string value. Click on the Save button, and that new xattr should be written to that .app folder.
Once you’ve tagged your first app, test the system out by looking for it. Open a new Finder window and select the Find command in the File menu to prepare it for searching. The two search criteria which you need to bring into its popup menu, currently showing Kind, are Keywords and Application Categories (not Category, which confusingly refers to the Application Category baked into the app itself). You’ll probably need to add either or both of those to the popup menu through the Other… item at the end. Locate and tick the search criteria from that list.
Set the criterion then to read, for example, Application Categories contains integrity to find all items with “integrity” in the string of the
com.apple.metadata:kMDItemApplicationCategories xattr. If you’re using keywords and want to exclude any from documents and other files, add another search criterion to limit results to Kind is Application.
You can now park this search window to one side, ready to type in some characters from the keywords or categories to find all apps which contain those.
There are some limitations to this scheme. You can’t of course tag any of the apps bundled as part of macOS, nor Safari, which are each protected by SIP. You should, though, be able to tag amost any other app, which needn’t even be in an Applications folder. However, when you update or replace an app, that is likely to wipe your xattrs, so be prepared.
If there’s sufficient interest, I could modify SearchKey so that it included Application Categories too, or even build a dedicated app for this purpose.