From 65ee813d0b538c94e431cb461fd021ba1e985c50 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Mon, 27 Jun 2022 18:15:40 -0500 Subject: [PATCH] Set LSApplicationCategoryType to public.app-category.games for macOS apps By default Electron uses the developer tools category Most packaged projects are games In the future, this should be configurable --- src/packager/packager.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/packager/packager.js b/src/packager/packager.js index 971e454..d970317 100644 --- a/src/packager/packager.js +++ b/src/packager/packager.js @@ -143,6 +143,10 @@ const CFBundleExecutable = 'CFBundleExecutable'; const CFBundleVersion = 'CFBundleVersion'; const CFBundleShortVersionString = 'CFBundleShortVersionString'; +// Describes the category of the app +// https://developer.apple.com/documentation/bundleresources/information_property_list/lsapplicationcategorytype +const LSApplicationCategoryType = 'LSApplicationCategoryType'; + class Packager extends EventTarget { constructor () { super(); @@ -276,7 +280,10 @@ class Packager extends EventTarget { // For simplicity, we'll set these to the same thing [CFBundleVersion]: this.options.app.version, - [CFBundleShortVersionString]: this.options.app.version, + [CFBundleShortVersionString]: this.options.app.version, + + // Most items generated by the packager are games + [LSApplicationCategoryType]: 'public.app-category.games' }; }