Dazzle Custom RSS Elements/Attributes
Attributes (on enclosure element)
- version - Specifies the version number of the widget attached in the enclosure.
- shortVersionString - Specifies the version number of the widget attached in the enclosure to display to the user.
- minimumSystemVersion - Specifies the minimum operating system version under which the widget will run (e.g. "10.5.4" or "10.5").
Elements (within item element)
- releaseNotesURL - Specifies a URL for release notes of the widget.
Custom Info.plist Keys
- DUAppcastURL (String) - Specifies URL of appcast. It is recommended to use the
appcastURLoption instead.
Object: Dazzle
Options:
- appcastURL (String) - Specifies URL of appcast. If not specified, Dazzle checks for a
DUAppcastURLkey in your widget's Info.plist file. - checkInterval (Number/String) - Passes the value to the
setCheckIntervalmethod. See documentation forsetCheckInterval. - shouldAutomaticallyCheckForUpdates (Boolean; Default: true) - Specifies whether Dazzle should automatically check for updates.
- shouldDisplayAlertBox (Boolean; Default: true) - Specifies whether Dazzle should display an alert box after checking for updates and finding that a new version is available.
- useSparkleNamespace (Boolean; Default: false) - Specifies whether Dazzle should look for the Sparkle namespace in appcasts, rather than the Dazzle namespace. Useful if you create your appcasts using a program that only supports the Sparkle namespace (like Reinvented Software's Feeder).
Methods:
onShow
Should be called by widget.onshow handler.
Arguments: None
onHide
Should be called by widget.onhide handler.
Arguments: None
getLatestVersion
Returns an object containing information about the latest version of the widget available.
{
version: "1.1",
shortVersionString: "1.1",
minimumSystemVersion: "10.5.7",
url: "http://blah.com/myWidget.wdgt.zip",
releaseNotesURL: "http://blah.com/myWidgetReleaseNotes.html"
}
Arguments: None
getCurrentVersion
Returns an object containing information about the current version of the widget.
{
version: "1.0",
shortVersionString: "1.0"
}
Arguments: None
getWidgetName
Returns a string containing the widget name (CFBundleName).
Arguments: None
getWidgetDisplayName
Returns a string containing the widget display name (CFBundleDisplayName).
Arguments: None
getSystemVersion
Returns a string containing the version of the user's operating system (e.g. "10.5.7").
Arguments: None
getIsUpToDate
Returns a boolean indicating whether the current version of the widget is the latest version available.
Arguments: None
getAppcastURL
Returns the appcast URL.
Arguments: None
setAppcastURL
Sets the URL of the appcast
Arguments:
- appcastURL (String)
getCheckInterval
Returns the check interval (a number).
Arguments: None
setCheckInterval
Sets the interval/frequency for automatic checks. This method can either be passed a number in milliseconds (must be greater than zero), or a preset string such as "Hourly" that the method will convert into milliseconds.
The following preset strings are available: "Half-Hourly", "Hourly", "Daily", and "Weekly".
Arguments:
- checkInterval (Number/String)
Examples:
// Sets the check interval to 3,600,000 milliseconds (1000 * 60 * 60)
dazzle.setCheckInterval("Hourly");
// Sets the check interval to five seconds (not recommended, except for testing!)
dazzle.setCheckInterval(5000);
getShouldAutomaticallyCheckForUpdates
Returns a boolean indicating whether automatic checks are enabled.
Arguments: None
setShouldAutomaticallyCheckForUpdates
Tells Dazzle whether it should automatically check for updates.
Arguments:
- shouldCheck (boolean)
getShouldDisplayAlertBox
Returns a boolean indicating whether the alert box is enabled.
Arguments: None
setShouldDisplayAlertBox
Tells Dazzle whether or not it should display the alert box after checking for updates and finding that a new update is available.
Arguments:
- shouldDisplayAlertBox (boolean)
checkForUpdatesInBackground
Checks for updates and displays an alert box to the user if a newer version is available.
Arguments: None
Example:
// Checks for Updates dazzle.checkForUpdatesInBackground();
checkForUpdateInformation
Checks for updates but doesn't display an alert box if a newer version is available.
Arguments:
- options (object; optional) - Object of any of the options listed below.
Options:
- onStart (function) - Specifies a function to call when starting to check for updates.
- onComplete (function) - Specifies a function to call when finished checking for updates.
Examples:
// Checks for Updates
dazzle.checkForUpdateInformation();
// Using options
dazzle.checkForUpdateInformation({ onComplete: foo });