我将 Sparkle 与 Go 应用程序一起使用。
火花.m:
#import <Headers/SUUpdater.h>
static SUUpdater* updater = nil;
void sparkle_checkUpdates()
{
if (!updater) {
updater = [[SUUpdater sharedUpdater] retain];
}
[updater setUpdateCheckInterval:3600];
[updater checkForUpdates:updater];
}
main.go :
func main() {
sparkle.Sparkle_checkUpdates()
// Some blocking call
}
我上传了一个 appcast.xml 文件,Sparkle 工作正常,更新被正确检测到。
但更新后,每次启动应用程序时,都会出现一个“最新”弹出窗口:
我希望这条消息不显示。仅当有可用更新时才应显示弹出窗口。
为此,我尝试更换
[updater checkForUpdates:updater];
和
[updater checkForUpdatesInBackground];
但是现在即使有更新,Sparkle 也无法正常工作。没有弹出窗口出现。
我在这里想念什么?
谢谢你的帮助!