auto_updater icon indicating copy to clipboard operation
auto_updater copied to clipboard

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

Open clong1995 opened this issue 1 year ago • 3 comments

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

clong1995 avatar Apr 09 '24 10:04 clong1995

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

lijy91 avatar Apr 09 '24 12:04 lijy91

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

lijy91 avatar Apr 09 '24 12:04 lijy91

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

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

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

clong1995 avatar Apr 10 '24 02:04 clong1995