【发布时间】:2023-01-13 07:34:11
【问题描述】:
我想在我的电子应用程序上设置一个深度链接功能,这是我的设置方式
app.removeAsDefaultProtocolClient('snetwork');
if (isDevelopment && process.platform === 'win32') {
// Set the path of electron.exe and your app.
// These two additional parameters are only available on windows.
// Setting this is required to get this working in dev mode.
app.setAsDefaultProtocolClient('snetwork', process.execPath, []);
} else {
app.setAsDefaultProtocolClient('snetwork');
}
但是当在 MacOS 上以开发模式运行时,协议被捕获,但打开默认的 electron 应用程序而不是我的应用程序。
在 Windows 上我有这个错误信息
【问题讨论】:
标签: electron deep-linking