Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【MAC OS】flutter run --release。无法启动Sparkle。 #60

Open
clong1995 opened this issue Apr 9, 2024 · 3 comments
Open

【MAC OS】flutter run --release。无法启动Sparkle。 #60

clong1995 opened this issue Apr 9, 2024 · 3 comments

Comments

@clong1995
Copy link

flutter run --release。无法启动Sparkle。打包后也没法启动Sparkle。
但是使用 flutter run --debug或者调试模式打包,可以启动Sparkle,并正确完成更新。

@lijy91
Copy link
Member

lijy91 commented Apr 9, 2024

检查一下Release模式是否开启了沙盒,沙盒化的配置请参考这里 https://sparkle-project.org/documentation/sandboxing/

@lijy91
Copy link
Member

lijy91 commented Apr 9, 2024

无法启动是指什么?有没有具体的日志?

@clong1995
Copy link
Author

沙盒确定没启用,flutter中没有任何日志。
但是我找到了临时解决办法:

await autoUpdater.setFeedURL(feedURL);
await autoUpdater.setScheduledCheckInterval(3600);
//延时了一秒,每次Sparkle都能成功出现更新提示。
Future.delayed(const Duration(seconds: 1), () async {
  await autoUpdater.checkForUpdates();
});

延时解决了我的问题,但是我不知道这样做是否正确。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants