我正在尝试使用 Sparkle 框架对我的 mac 应用程序进行自动或静默更新,并在我的 info.plist 中将密钥 SUEnableAutomaticChecks 添加为 YES。我在 AppController 中编写代码,如下所示:
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
//Sparkle auto update
SUUpdater *sparkleUpdater = [SUUpdater sharedUpdater];
[sparkleUpdater checkForUpdates:self];
sparkleUpdater.delegate = [[NRMUpdateDelegate alloc] init];
[sparkleUpdater setAutomaticallyChecksForUpdates:YES];
[sparkleUpdater setAutomaticallyDownloadsUpdates:YES];
[sparkleUpdater checkForUpdatesInBackground];
}
我仍然得到更新程序窗口来更新安装新版本。我想在后台做这一切。
谁能建议我如何做到这一点....