自动或静默更新使用火花框架的mac



我正在尝试使用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];
}

我仍然得到更新窗口更新安装新版本。我想在后台做这些。

谁能告诉我怎么做....

根据文档,

[sparkleUpdater checkForUpdates:self];

/*!
    Explicitly checks for updates and displays a progress dialog while doing so.
    This method is meant for a main menu item.
    Connect any menu item to this action in Interface Builder,
    and Sparkle will check for updates and report back its findings verbosely
    when it is invoked.
 */

最新更新