These instructions below are for adding preferences in a Cocoa nib and assume you have a Preferences nib with its File's Owner
being set to your Preferences controller class (e.g, a NSWindowController
subclass). The controller class should have an updater
property set to your application’s SPUUpdater
, which may be passed from your application’s delegate.
File's Owner
from the popup, and set the Model Key Path to updater.automaticallyChecksForUpdates
.File's Owner
from the popup, and set the Model Key Path to updater.updateCheckInterval
.File's Owner
from the popup, and set the Model Key Path to updater.automaticallyChecksForUpdates
.Follow directions similar to Enable automatic checking to bind a check button to updater.sendsSystemProfile
or updater.automaticallyDownloadsUpdates
. See customization for details on the available keys.
These instructions below are for adding preferences in a Cocoa nib and assume you have a Preferences nib with its File's Owner
being set to your Preferences controller class (e.g, a NSWindowController
subclass). The controller class should have an updater
property set to your application’s SUUpdater
, which may be passed from your application’s delegate.
File's Owner
from the popup, and set the Model Key Path to updater.automaticallyChecksForUpdates
.File's Owner
from the popup, and set the Model Key Path to updater.updateCheckInterval
.File's Owner
from the popup, and set the Model Key Path to updater.automaticallyChecksForUpdates
.Follow directions similar to Enable automatic checking. to bind a check button to sendsSystemProfile
or automaticallyDownloadsUpdates
. See customization for details on the available keys.
These directions do not work for non-app bundles, as the updater you add to the nib will be the sharedUpdater
for the application bundle. To be able to bind to the updater for your bundle, you can add the following accessor to your preferences controller (the owner of the nib):
- (SUUpdater *)updater {
return [SUUpdater updaterForBundle:[NSBundle bundleForClass:[self class]]];
}
Then just bind the controls to the File’s Owner, and start the Model Key Path with updater., e.g. updater.automaticallyChecksForUpdates.
macOS caches plist files in ~/Library/Preferences
, so don’t edit them directly. If you want to tweak these files for testing (e.g. change last update check date), use the defaults
command.