已签名的电子应用 shell.openItem() 失败
signed electron app shell.openItem() fails
我希望我的 Electron 应用程序可以使用系统默认应用程序(默认文本编辑器)打开 *.txt 文件(由我的应用程序生成)。
我使用 shell.openItem(path)
来执行它 - 它运行良好......直到我打包 (mas) 并签署了应用程序。我想我必须在签名时添加一些权利,但已经尝试了很多但没有成功:(
任何人都可以帮助我吗?
不幸的是,Electron 在 Mac App Store 构建中禁用了 shell.openItem()
API。来自他们的 signing guide:
[shell.openItem()
] will fail when the app is signed for distribution in the Mac App Store. Subscribe to #9005 for updates.
但是,有一种解决方法可以让您拥有相同的功能:
shell.openExternal('file://' + myFilePath);
此方法也已确认通过Apple Store Reviews (see here)。
我希望我的 Electron 应用程序可以使用系统默认应用程序(默认文本编辑器)打开 *.txt 文件(由我的应用程序生成)。
我使用 shell.openItem(path)
来执行它 - 它运行良好......直到我打包 (mas) 并签署了应用程序。我想我必须在签名时添加一些权利,但已经尝试了很多但没有成功:(
任何人都可以帮助我吗?
不幸的是,Electron 在 Mac App Store 构建中禁用了 shell.openItem()
API。来自他们的 signing guide:
[
shell.openItem()
] will fail when the app is signed for distribution in the Mac App Store. Subscribe to #9005 for updates.
但是,有一种解决方法可以让您拥有相同的功能:
shell.openExternal('file://' + myFilePath);
此方法也已确认通过Apple Store Reviews (see here)。