reactjs - 将 Electron 应用程序发布到 Windows 商店时如何修复 'The available app icons include a default icon'?

标签 reactjs electron windows-store-apps windows-store electron-builder

我在这里开源的 Electron react 项目:windows-terminal-tweaker

renderer 文件夹运行 npm run release 后,它会在 renderer/dist 目录中构建应用程序。

dist/TerminalTweaker 目录包含所有构建的文件以及 .exe 文件。

此后,我使用 Electron-windows-store 来使我的应用程序发布做好准备。这是我的脚本:

const convertToWindowsStore = require('electron-windows-store')

convertToWindowsStore({
   containerVirtualization: false,
   inputDirectory: 'dist/TerminalTweaker',
   outputDirectory: 'output',
   packageVersion: '1.0.0.0',
   packageName: 'terminalTweaker',
   identityName : '<secretId>' , 
   familyName : '<secretString>' ,
   publisherDisplayName : "Natesh M Bhat" , 
   packageDisplayName: 'Terminal Tweaker',
   packageDescription: 'Tweak your windows terminal to heart\'s content with this app using its beautiful interface to configure everything about the terminal.',
   packageExecutable: 'dist/TerminalTweaker/Terminal Tweaker.exe',
   publisher: 'CN=<secretString>',
   windowsKit: 'C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.18362.0\\x64',
   finalSay: function () {
     return new Promise((resolve, reject) => resolve())
   }
})

现在,一旦我获得 terminalTweaker.appx ,我就会将此包上传到 Windows 应用商店应用程序仪表板中。

当我提交提交时,它被拒绝,显示以下错误。我该如何解决这个问题?

App Policies: 10.1.1 Icon

Notes To Developer

The available app icons include a default icon. Icons must uniquely represent apps so users associate icons with the appropriate apps and do not confuse one app for another. For information about icons and tiles in Windows apps, see Application Icons and Logos, or for 3D icons for Mixed Reality apps, see 3D app launcher design guidance.

最佳答案

您需要更改Electron提供的默认图标(即Electron的标志)。该图标也将在 Windows 应用商店中使用,它显然不会反射(reflect)您的应用程序。

在您的案例中,您将在以下路径下找到它:

  • windows-terminal-tweaker/renderer/public/favicon.ico

您可能只是忘记更改该文件,因为其他所有图标似乎都可以工作:)

关于reactjs - 将 Electron 应用程序发布到 Windows 商店时如何修复 'The available app icons include a default icon'?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57310667/

相关文章:

node.js - Webpack - 找不到模块 : Error: Can't resolve 'node_modules\chokidar\lib'

sqlite - 在Electron和Ionic 4中使用sqlite3

c# - VSO REST API - 获取用户配置文件图像仅适用于基本身份验证?

cryptography - 在我的应用程序中使用加密技术会限制其可用性吗?

c# - 使用 .net native 工具链编译后 Uwp 应用程序立即崩溃

javascript - mapDispatchToProps 中的链接粗箭头让我出错

javascript - 防止父组件状态改变后子组件状态重置同时获取所有子组件的值:ReactJS+ Typescript

javascript - 无法读取 firebase 函数中未定义错误的属性 https

javascript - 在 Reactjs 中选择多个选项

electron - Uncaught Error : could not call remote function 'capturePage' on electron app