mirror of
https://github.com/sparkle-project/sparkle-project.github.io.git
synced 2025-11-01 15:35:08 +00:00
1195 lines
74 KiB
HTML
1195 lines
74 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>SPUUpdater Class Reference</title>
|
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
|
<meta charset='utf-8'>
|
|
<meta name="viewport" content="width=device-width, viewport-fit=cover, initial-scale=1.0" />
|
|
<script src="../js/jquery.min.js" defer></script>
|
|
<script src="../js/jazzy.js" defer></script>
|
|
|
|
</head>
|
|
<body>
|
|
<a name="//apple_ref/objc/Class/SPUUpdater" class="dashAnchor"></a>
|
|
<a title="SPUUpdater Class Reference"></a>
|
|
<header>
|
|
<div class="content-wrapper">
|
|
<p>
|
|
<a href="../index.html">Sparkle 2.7.0 Docs</a>
|
|
<span class="no-mobile"> (59% documented)</span>
|
|
</p>
|
|
|
|
|
|
</div>
|
|
</header>
|
|
<div id="breadcrumbs-container">
|
|
<div class="content-wrapper">
|
|
<p id="breadcrumbs">
|
|
<span class="no-mobile">
|
|
<a href="../index.html">Sparkle</a>
|
|
<img id="carat" src="../img/carat.png" alt=""/>
|
|
<a href="../Classes.html">Classes</a>
|
|
<img id="carat" src="../img/carat.png" alt=""/>
|
|
SPUUpdater Class Reference
|
|
</span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="wrapper">
|
|
<div class="article-wrapper">
|
|
<article class="main-content">
|
|
<section>
|
|
<section class="section">
|
|
<h1>SPUUpdater</h1>
|
|
<div class="declaration">
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">@interface</span> <span class="nc">SPUUpdater</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">SPUUpdater</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<p>The main API in Sparkle for controlling the update mechanism.</p>
|
|
|
|
<p>This class is used to configure the update parameters as well as manually and automatically schedule and control checks for updates.</p>
|
|
|
|
<p>For convenience, you can create a standard or nib instantiable updater by using <code><a href="../Classes/SPUStandardUpdaterController.html">SPUStandardUpdaterController</a></code>.</p>
|
|
|
|
<p>Prefer to set initial properties in your bundle’s Info.plist as described in <a href="https://sparkle-project.org/documentation/customization/">Customizing Sparkle</a>.</p>
|
|
|
|
<p>Otherwise only if you need dynamic behavior for user settings should you set properties on the updater such as:</p>
|
|
|
|
<ul>
|
|
<li><code>automaticallyChecksForUpdates</code></li>
|
|
<li><code>updateCheckInterval</code></li>
|
|
<li><code>automaticallyDownloadsUpdates</code></li>
|
|
<li><code>feedURL</code></li>
|
|
</ul>
|
|
|
|
<p>Please view the documentation on each of these properties for more detail if you are to configure them dynamically.</p>
|
|
|
|
</section>
|
|
<section class="section task-group-section">
|
|
<div class="task-group">
|
|
<ul>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(im)initWithHostBundle:applicationBundle:userDriver:delegate:"></a>
|
|
<a name="//apple_ref/objc/Method/-initWithHostBundle:applicationBundle:userDriver:delegate:" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(im)initWithHostBundle:applicationBundle:userDriver:delegate:">-initWithHostBundle:<wbr>applicationBundle:<wbr>userDriver:<wbr>delegate:<wbr></a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Initializes a new <code>SPUUpdater</code> instance</p>
|
|
|
|
<p>This creates an updater, but to start it and schedule update checks <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(im)startUpdater:">-startUpdater:</a></code> needs to be invoked first.</p>
|
|
|
|
<p>Related: See <code><a href="../Classes/SPUStandardUpdaterController.html">SPUStandardUpdaterController</a></code> which wraps a <code>SPUUpdater</code> instance and is suitable for instantiating inside of nib files.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithHostBundle</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSBundle</span> <span class="o">*</span><span class="p">)</span><span class="nv">hostBundle</span>
|
|
<span class="nf">applicationBundle</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSBundle</span> <span class="o">*</span><span class="p">)</span><span class="nv">applicationBundle</span>
|
|
<span class="nf">userDriver</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">id</span><span class="o"><</span><span class="n"><a href="../Protocols/SPUUserDriver.html">SPUUserDriver</a></span><span class="o">></span><span class="p">)</span><span class="nv">userDriver</span>
|
|
<span class="nf">delegate</span><span class="p">:</span>
|
|
<span class="p">(</span><span class="n">nullable</span> <span class="n">id</span><span class="o"><</span><span class="n"><a href="../Protocols/SPUUpdaterDelegate.html">SPUUpdaterDelegate</a></span><span class="o">></span><span class="p">)</span><span class="nv">delegate</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="nf">init</span><span class="p">(</span><span class="nv">hostBundle</span><span class="p">:</span> <span class="kt">Bundle</span><span class="p">,</span> <span class="nv">applicationBundle</span><span class="p">:</span> <span class="kt">Bundle</span><span class="p">,</span> <span class="nv">userDriver</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SPUUserDriver.html">SPUUserDriver</a></span><span class="p">,</span> <span class="nv">delegate</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SPUUpdaterDelegate.html">SPUUpdaterDelegate</a></span><span class="p">?)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>hostBundle</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The bundle that should be targeted for updating.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>applicationBundle</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The application bundle that should be waited for termination and relaunched (unless overridden). Usually this can be the same as hostBundle. This may differ when updating a plug-in or other non-application bundle.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>userDriver</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The user driver that Sparkle uses for user update interaction.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>delegate</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The delegate for <code>SPUUpdater</code>.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(im)init"></a>
|
|
<a name="//apple_ref/objc/Method/-init" class="dashAnchor"></a>
|
|
<a class="token discouraged" href="#/c:objc(cs)SPUUpdater(im)init">-init</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="aside aside-unavailable">
|
|
<p class="aside-title">Unavailable</p>
|
|
|
|
</div>
|
|
<div class="abstract">
|
|
<p>Use <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(im)initWithHostBundle:applicationBundle:userDriver:delegate:">-initWithHostBundle:applicationBundle:userDriver:delegate:</a></code> or <code><a href="../Classes/SPUStandardUpdaterController.html">SPUStandardUpdaterController</a></code> standard adapter instead.</p>
|
|
|
|
<p>If you want to drop an updater into a nib, use <code><a href="../Classes/SPUStandardUpdaterController.html">SPUStandardUpdaterController</a></code>.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span><span class="n">init</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(im)startUpdater:"></a>
|
|
<a name="//apple_ref/objc/Method/-startUpdater:" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(im)startUpdater:">-startUpdater:<wbr></a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Starts the updater.</p>
|
|
|
|
<p>This method first checks if Sparkle is configured properly. A valid feed URL should be set before this method is invoked.</p>
|
|
|
|
<p>If the configuration is valid, an update cycle is started in the next main runloop cycle.
|
|
During this cycle, a permission prompt may be brought up (if needed) for checking if the user wants automatic update checking.
|
|
Otherwise if automatic update checks are enabled, a scheduled update alert may be brought up if enough time has elapsed since the last check.
|
|
See <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(py)automaticallyChecksForUpdates">automaticallyChecksForUpdates</a></code> for more information.</p>
|
|
|
|
<p>After starting the updater and before the next runloop cycle, one of <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(im)checkForUpdates">-checkForUpdates</a></code>, <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(im)checkForUpdatesInBackground">-checkForUpdatesInBackground</a></code>, or <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(im)checkForUpdateInformation">-checkForUpdateInformation</a></code> can be invoked.
|
|
This may be useful if you want to check for updates immediately or without showing a potential permission prompt.</p>
|
|
|
|
<p>If the updater cannot be started (i.e, due to a configuration issue in the application), you may want to fall back appropriately.
|
|
For example, the standard updater controller (<code><a href="../Classes/SPUStandardUpdaterController.html">SPUStandardUpdaterController</a></code>) alerts the user that the app is misconfigured and to contact the developer.</p>
|
|
|
|
<p>This must be called on the main thread.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">BOOL</span><span class="p">)</span><span class="nf">startUpdater</span><span class="p">:(</span><span class="n">NSError</span> <span class="o">*</span><span class="n">_Nullable</span> <span class="o">*</span><span class="n">_Nullable</span><span class="p">)</span><span class="nv">error</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">start</span><span class="p">()</span> <span class="k">throws</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>error</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The error that is populated if this method fails. Pass NULL if not interested in the error information.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div>
|
|
<h4>Return Value</h4>
|
|
<p>YES if the updater started otherwise NO with a populated error</p>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(im)checkForUpdates"></a>
|
|
<a name="//apple_ref/objc/Method/-checkForUpdates" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(im)checkForUpdates">-checkForUpdates</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Checks for updates, and displays progress while doing so if needed.</p>
|
|
|
|
<p>This is meant for users initiating a new update check or checking the current update progress.</p>
|
|
|
|
<p>If an update hasn’t started, the user may be shown that a new check for updates is occurring.
|
|
If an update has already been downloaded or begun installing from a previous session, the user may be presented to install that update.
|
|
If the user is already being presented with an update, that update will be shown to the user in active focus.</p>
|
|
|
|
<p>This will find updates that the user has previously opted into skipping.</p>
|
|
|
|
<p>See <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(py)canCheckForUpdates">canCheckForUpdates</a></code> property which can determine when this method may be invoked.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="n">checkForUpdates</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">checkForUpdates</span><span class="p">()</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(im)checkForUpdatesInBackground"></a>
|
|
<a name="//apple_ref/objc/Method/-checkForUpdatesInBackground" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(im)checkForUpdatesInBackground">-checkForUpdatesInBackground</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Checks for updates, but does not show any UI unless an update is found.</p>
|
|
|
|
<p>You usually do not need to call this method directly. If <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(py)automaticallyChecksForUpdates">automaticallyChecksForUpdates</a></code> is <code>YES,</code>
|
|
Sparkle calls this method automatically according to its update schedule using the <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(py)updateCheckInterval">updateCheckInterval</a></code>
|
|
and the <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(py)lastUpdateCheckDate">lastUpdateCheckDate</a></code>. Therefore, you should typically only consider calling this method directly if you
|
|
opt out of automatic update checks. Calling this method when updating your own bundle is invalid if Sparkle is configured
|
|
to ask the user’s permission to check for updates automatically and <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(py)automaticallyChecksForUpdates">automaticallyChecksForUpdates</a></code> is <code>NO</code>.
|
|
If you want to reset the updater’s cycle after an updater setting change, see <code>resetUpdateCycle</code> or <code>resetUpdateCycleAfterShortDelay</code> instead.</p>
|
|
|
|
<p>This is meant for programmatically initiating a check for updates in the background without the user initiating it.
|
|
This check will not show UI if no new updates are found.</p>
|
|
|
|
<p>If a new update is found, the updater’s user driver may handle showing it at an appropriate (but not necessarily immediate) time.
|
|
If you want control over when and how a new update is shown, please see <a href="https://sparkle-project.org/documentation/gentle-reminders/">https://sparkle-project.org/documentation/gentle-reminders/</a></p>
|
|
|
|
<p>Note if automated downloading/installing is turned on, either a new update may be downloaded in the background to be installed silently,
|
|
or an already downloaded update may be shown.</p>
|
|
|
|
<p>This will not find updates that the user has opted into skipping.</p>
|
|
|
|
<p>This method does not do anything if there is a <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(py)sessionInProgress">sessionInProgress</a></code>.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="n">checkForUpdatesInBackground</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">checkForUpdatesInBackground</span><span class="p">()</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(im)checkForUpdateInformation"></a>
|
|
<a name="//apple_ref/objc/Method/-checkForUpdateInformation" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(im)checkForUpdateInformation">-checkForUpdateInformation</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Begins a “probing” check for updates which will not actually offer to
|
|
update to that version.</p>
|
|
|
|
<p>However, the delegate methods
|
|
<code><a href="../Protocols/SPUUpdaterDelegate.html#/c:objc(pl)SPUUpdaterDelegate(im)updater:didFindValidUpdate:">-[SPUUpdaterDelegate updater:didFindValidUpdate:]</a></code> and
|
|
<code><a href="../Protocols/SPUUpdaterDelegate.html#/c:objc(pl)SPUUpdaterDelegate(im)updaterDidNotFindUpdate:">-[SPUUpdaterDelegate updaterDidNotFindUpdate:]</a></code> will be called,
|
|
so you can use that information in your UI.</p>
|
|
|
|
<p><code><a href="../Protocols/SPUUpdaterDelegate.html#/c:objc(pl)SPUUpdaterDelegate(im)updater:didFinishUpdateCycleForUpdateCheck:error:">-[SPUUpdaterDelegate updater:didFinishUpdateCycleForUpdateCheck:error:]</a></code> will be called when
|
|
this probing check is completed.</p>
|
|
|
|
<p>Updates that have been skipped by the user will not be found.</p>
|
|
|
|
<p>This method does not do anything if there is a <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(py)sessionInProgress">sessionInProgress</a></code>.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="n">checkForUpdateInformation</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">checkForUpdateInformation</span><span class="p">()</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(py)canCheckForUpdates"></a>
|
|
<a name="//apple_ref/objc/Property/canCheckForUpdates" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(py)canCheckForUpdates">canCheckForUpdates</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>A property indicating whether or not updates can be checked by the user.</p>
|
|
|
|
<p>An update check can be made by the user when an update session isn’t in progress, or when an update or its progress is being shown to the user.
|
|
A user cannot check for updates when data (such as the feed or an update) is still being downloaded automatically in the background.</p>
|
|
|
|
<p>This property is suitable to use for menu item validation for seeing if <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(im)checkForUpdates">-checkForUpdates</a></code> can be invoked.</p>
|
|
|
|
<p>This property is also KVO-compliant.</p>
|
|
|
|
<p>Note this property does not reflect whether or not an update session is in progress. Please see <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(py)sessionInProgress">sessionInProgress</a></code> property instead.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">readonly</span><span class="p">)</span> <span class="n">BOOL</span> <span class="n">canCheckForUpdates</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">canCheckForUpdates</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(py)sessionInProgress"></a>
|
|
<a name="//apple_ref/objc/Property/sessionInProgress" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(py)sessionInProgress">sessionInProgress</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>A property indicating whether or not an update session is in progress.</p>
|
|
|
|
<p>An update session is in progress when the appcast is being downloaded, an update is being downloaded,
|
|
an update is being shown, update permission is being requested, or the installer is being started.</p>
|
|
|
|
<p>An active session is when Sparkle’s fired scheduler is running.</p>
|
|
|
|
<p>Note an update session may not be running even though Sparkle’s installer (ran as a separate process) may be running,
|
|
or even though the update has been downloaded but the installation has been deferred. In both of these cases, a new update session
|
|
may be activated with the update resumed at a later point (automatically or manually).</p>
|
|
|
|
<p>See also:</p>
|
|
|
|
<ul>
|
|
<li><code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(py)canCheckForUpdates">canCheckForUpdates</a></code> property which is more suited for menu item validation and deciding if the user can initiate update checks.</li>
|
|
<li><code><a href="../Protocols/SPUUpdaterDelegate.html#/c:objc(pl)SPUUpdaterDelegate(im)updater:didFinishUpdateCycleForUpdateCheck:error:">-[SPUUpdaterDelegate updater:didFinishUpdateCycleForUpdateCheck:error:]</a></code> which lets the updater delegate know when an update cycle and session finishes.</li>
|
|
</ul>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">readonly</span><span class="p">)</span> <span class="n">BOOL</span> <span class="n">sessionInProgress</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">sessionInProgress</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(py)automaticallyChecksForUpdates"></a>
|
|
<a name="//apple_ref/objc/Property/automaticallyChecksForUpdates" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(py)automaticallyChecksForUpdates">automaticallyChecksForUpdates</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>A property indicating whether or not to check for updates automatically.</p>
|
|
|
|
<p>By default, Sparkle asks users on second launch for permission if they want automatic update checks enabled
|
|
and sets this property based on their response. If <code>SUEnableAutomaticChecks</code> is set in the Info.plist,
|
|
this permission request is not performed however.</p>
|
|
|
|
<p>Setting this property will persist in the host bundle’s user defaults.
|
|
Hence developers shouldn’t maintain an additional user default for this property.
|
|
Only set this property if the user wants to change the default via a user settings option.
|
|
Do not always set it on launch unless you want to ignore the user’s preference.
|
|
For testing environments, you can disable update checks by passing <code>-SUEnableAutomaticChecks NO</code>
|
|
to your app’s command line arguments instead of setting this property.</p>
|
|
|
|
<p>The update schedule cycle will be reset in a short delay after the property’s new value is set.
|
|
This is to allow reverting this property without kicking off a schedule change immediately</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">)</span> <span class="n">BOOL</span> <span class="n">automaticallyChecksForUpdates</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">automaticallyChecksForUpdates</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(py)updateCheckInterval"></a>
|
|
<a name="//apple_ref/objc/Property/updateCheckInterval" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(py)updateCheckInterval">updateCheckInterval</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>A property indicating the current automatic update check interval in seconds.</p>
|
|
|
|
<p>Prefer to set SUScheduledCheckInterval directly in your Info.plist for setting the initial value.</p>
|
|
|
|
<p>Setting this property will persist in the host bundle’s user defaults.
|
|
Hence developers shouldn’t maintain an additional user default for this property.
|
|
Only set this property if the user wants to change the default via a user settings option.
|
|
Do not always set it on launch unless you want to ignore the user’s preference.</p>
|
|
|
|
<p>The update schedule cycle will be reset in a short delay after the property’s new value is set.
|
|
This is to allow reverting this property without kicking off a schedule change immediately</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">)</span> <span class="n">NSTimeInterval</span> <span class="n">updateCheckInterval</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">updateCheckInterval</span><span class="p">:</span> <span class="kt">TimeInterval</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(py)automaticallyDownloadsUpdates"></a>
|
|
<a name="//apple_ref/objc/Property/automaticallyDownloadsUpdates" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(py)automaticallyDownloadsUpdates">automaticallyDownloadsUpdates</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>A property indicating whether or not updates can be automatically downloaded in the background.</p>
|
|
|
|
<p>By default, updates are not automatically downloaded.</p>
|
|
|
|
<p>By default starting from Sparkle 2.4, users are provided an option to opt in to automatically downloading and installing updates when they are asked if they want automatic update checks enabled.
|
|
The default value for this option is based on what the developer sets <code>SUAutomaticallyUpdate</code> in their Info.plist.
|
|
This is not done if <code>SUEnableAutomaticChecks</code> is set in the Info.plist however. Please check <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(py)automaticallyChecksForUpdates">automaticallyChecksForUpdates</a></code> property for more details.</p>
|
|
|
|
<p>Note that the developer can disallow automatic downloading of updates from being enabled (via <code>SUAllowsAutomaticUpdates</code> Info.plist key).
|
|
In this case, this property will return NO regardless of how this property is set.</p>
|
|
|
|
<p>Prefer to set <code>SUAutomaticallyUpdate</code> directly in your Info.plist for setting the initial value.</p>
|
|
|
|
<p>Setting this property will persist in the host bundle’s user defaults.
|
|
Hence developers shouldn’t maintain an additional user default for this property.
|
|
Only set this property if the user wants to change the default via a user settings option.
|
|
Do not always set it on launch unless you want to ignore the user’s preference.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">)</span> <span class="n">BOOL</span> <span class="n">automaticallyDownloadsUpdates</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">automaticallyDownloadsUpdates</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(py)feedURL"></a>
|
|
<a name="//apple_ref/objc/Property/feedURL" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(py)feedURL">feedURL</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>The URL of the appcast used to download update information.</p>
|
|
|
|
<p>If the updater’s delegate implements <code><a href="../Protocols/SPUUpdaterDelegate.html#/c:objc(pl)SPUUpdaterDelegate(im)feedURLStringForUpdater:">-[SPUUpdaterDelegate feedURLStringForUpdater:]</a></code>, this will return that feed URL.
|
|
Otherwise if the feed URL has been set before using <code>-[SPUUpdater setFeedURL:]</code>, the feed URL returned will be retrieved from the host bundle’s user defaults.
|
|
Otherwise the feed URL in the host bundle’s Info.plist will be returned.
|
|
If no feed URL can be retrieved, returns nil.</p>
|
|
|
|
<p>For setting a primary feed URL, please set the <code>SUFeedURL</code> property in your Info.plist.
|
|
For setting an alternative feed URL, please prefer <code><a href="../Protocols/SPUUpdaterDelegate.html#/c:objc(pl)SPUUpdaterDelegate(im)feedURLStringForUpdater:">-[SPUUpdaterDelegate feedURLStringForUpdater:]</a></code> over <code>-setFeedURL:</code>.
|
|
Please see the documentation for <code>-setFeedURL:</code> for migrating away from that API.</p>
|
|
|
|
<p>This property must be called on the main thread; calls from background threads will return nil.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">readonly</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n">NSURL</span> <span class="o">*</span><span class="n">feedURL</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">feedURL</span><span class="p">:</span> <span class="kt">URL</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(im)clearFeedURLFromUserDefaults"></a>
|
|
<a name="//apple_ref/objc/Method/-clearFeedURLFromUserDefaults" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(im)clearFeedURLFromUserDefaults">-clearFeedURLFromUserDefaults</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Clears any feed URL from the host bundle’s user defaults that was set via <code>-setFeedURL:</code></p>
|
|
|
|
<p>You should call this method if you have used <code>-setFeedURL:</code> in the past and want to stop using that API.
|
|
Otherwise for compatibility Sparkle will prefer to use the feed URL that was set in the user defaults over the one that was specified in the host bundle’s Info.plist,
|
|
which is often undesirable (except for testing purposes).</p>
|
|
|
|
<p>If a feed URL is found stored in the host bundle’s user defaults (from calling <code>-setFeedURL:</code>) before it gets cleared,
|
|
then that previously set URL is returned from this method.</p>
|
|
|
|
<p>This method should be called as soon as possible, after your application finished launching or right after the updater has been started
|
|
if you manually manage starting the updater.</p>
|
|
|
|
<p>Updaters that update other developer’s bundles should not call this method.</p>
|
|
|
|
<p>This method must be called on the main thread.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nullable</span> <span class="n">NSURL</span> <span class="o">*</span><span class="p">)</span><span class="n">clearFeedURLFromUserDefaults</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">clearFeedURLFromUserDefaults</span><span class="p">()</span> <span class="o">-></span> <span class="kt">URL</span><span class="p">?</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Return Value</h4>
|
|
<p>A previously set feed URL in the host bundle’s user defaults, if available, otherwise this returns <code>nil</code></p>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(py)hostBundle"></a>
|
|
<a name="//apple_ref/objc/Property/hostBundle" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(py)hostBundle">hostBundle</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>The host bundle that is being updated.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">readonly</span><span class="p">)</span> <span class="n">NSBundle</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">hostBundle</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">hostBundle</span><span class="p">:</span> <span class="kt">Bundle</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(py)userAgentString"></a>
|
|
<a name="//apple_ref/objc/Property/userAgentString" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(py)userAgentString">userAgentString</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>The user agent used when checking for updates.</p>
|
|
|
|
<p>By default the user agent string returned is in the format:
|
|
<code>$(BundleDisplayName)/$(BundleDisplayVersion) Sparkle/$(SparkleDisplayVersion)</code></p>
|
|
|
|
<p>BundleDisplayVersion is derived from the main application’s Info.plist’s CFBundleShortVersionString.</p>
|
|
|
|
<p>Note if Sparkle is being used to update another application, the bundle information retrieved is from the main application performing the updating.</p>
|
|
|
|
<p>This default implementation can be overridden.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">copy</span><span class="p">)</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">userAgentString</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">userAgentString</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(py)httpHeaders"></a>
|
|
<a name="//apple_ref/objc/Property/httpHeaders" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(py)httpHeaders">httpHeaders</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>The HTTP headers used when checking for updates, downloading release notes, and downloading updates.</p>
|
|
|
|
<p>The keys of this dictionary are HTTP header fields and values are corresponding values.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">copy</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n">NSDictionary</span><span class="o"><</span><span class="n">NSString</span> <span class="o">*</span><span class="p">,</span> <span class="n">NSString</span> <span class="o">*></span> <span class="o">*</span><span class="n">httpHeaders</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">httpHeaders</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span> <span class="p">:</span> <span class="kt">String</span><span class="p">]?</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(py)sendsSystemProfile"></a>
|
|
<a name="//apple_ref/objc/Property/sendsSystemProfile" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(py)sendsSystemProfile">sendsSystemProfile</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>A property indicating whether or not the user’s system profile information is sent when checking for updates.</p>
|
|
|
|
<p>Setting this property will persist in the host bundle’s user defaults.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">)</span> <span class="n">BOOL</span> <span class="n">sendsSystemProfile</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">sendsSystemProfile</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(py)lastUpdateCheckDate"></a>
|
|
<a name="//apple_ref/objc/Property/lastUpdateCheckDate" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(py)lastUpdateCheckDate">lastUpdateCheckDate</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>The date of the last update check or nil if no check has been performed yet.</p>
|
|
|
|
<p>For testing purposes, the last update check is stored in the <code>SULastCheckTime</code> key in the host bundle’s user defaults.
|
|
For example, <code>defaults delete my-bundle-id SULastCheckTime</code> can be invoked to clear the last update check time and test
|
|
if update checks are automatically scheduled.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">copy</span><span class="p">,</span> <span class="n">readonly</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n">NSDate</span> <span class="o">*</span><span class="n">lastUpdateCheckDate</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">lastUpdateCheckDate</span><span class="p">:</span> <span class="kt">Date</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(im)resetUpdateCycle"></a>
|
|
<a name="//apple_ref/objc/Method/-resetUpdateCycle" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(im)resetUpdateCycle">-resetUpdateCycle</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Appropriately re-schedules the update checking timer according to the current updater settings.</p>
|
|
|
|
<p>This method should only be called in response to a user changing updater settings. This method may trigger a new update check to occur in the background if an updater setting such as the updater’s feed or allowed channels has changed.</p>
|
|
|
|
<p>If the <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(py)updateCheckInterval">updateCheckInterval</a></code> or <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(py)automaticallyChecksForUpdates">automaticallyChecksForUpdates</a></code> properties are changed, this method is automatically invoked after a short delay using <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(im)resetUpdateCycleAfterShortDelay">-resetUpdateCycleAfterShortDelay</a></code>. In these cases, manually resetting the update cycle is not necessary.</p>
|
|
|
|
<p>See also <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(im)resetUpdateCycleAfterShortDelay">-resetUpdateCycleAfterShortDelay</a></code> which gives the user a short delay before triggering a cycle reset.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="n">resetUpdateCycle</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">resetUpdateCycle</span><span class="p">()</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(im)resetUpdateCycleAfterShortDelay"></a>
|
|
<a name="//apple_ref/objc/Method/-resetUpdateCycleAfterShortDelay" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(im)resetUpdateCycleAfterShortDelay">-resetUpdateCycleAfterShortDelay</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Appropriately re-schedules the update checking timer according to the current updater settings after a short cancellable delay.</p>
|
|
|
|
<p>This method calls <code>resetUpdateCycle</code> after a short delay to give the user a short amount of time to cancel changing an updater setting.
|
|
If this method is called again, any previous reset request that is still inflight will be cancelled.</p>
|
|
|
|
<p>For example, if the user changes the <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(py)automaticallyChecksForUpdates">automaticallyChecksForUpdates</a></code> setting to <code>YES</code>, but quickly undoes their change then
|
|
no cycle reset will be done.</p>
|
|
|
|
<p>If the <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(py)updateCheckInterval">updateCheckInterval</a></code> or <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(py)automaticallyChecksForUpdates">automaticallyChecksForUpdates</a></code> properties are changed, this method is automatically invoked. In these cases, manually resetting the update cycle is not necessary.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="n">resetUpdateCycleAfterShortDelay</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">resetUpdateCycleAfterShortDelay</span><span class="p">()</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(cs)SPUUpdater(py)systemProfileArray"></a>
|
|
<a name="//apple_ref/objc/Property/systemProfileArray" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(cs)SPUUpdater(py)systemProfileArray">systemProfileArray</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>The system profile information that is sent when checking for updates.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">copy</span><span class="p">,</span> <span class="n">readonly</span><span class="p">)</span> <span class="n">NSArray</span><span class="o"><</span><span class="n">NSDictionary</span><span class="o"><</span><span class="n">NSString</span> <span class="o">*</span><span class="p">,</span> <span class="n">NSString</span> <span class="o">*></span> <span class="o">*></span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">systemProfileArray</span><span class="p">;</span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">systemProfileArray</span><span class="p">:</span> <span class="p">[[</span><span class="kt">String</span> <span class="p">:</span> <span class="kt">String</span><span class="p">]]</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
</article>
|
|
</div>
|
|
<div class="nav-wrapper">
|
|
<nav class="nav-bottom">
|
|
<ul class="nav-groups">
|
|
<li class="nav-group-name">
|
|
<a href="../Classes.html">Classes</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="../Classes/SPUDownloadData.html">SPUDownloadData</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Classes/SPUStandardUpdaterController.html">SPUStandardUpdaterController</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Classes/SPUStandardUserDriver.html">SPUStandardUserDriver</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Classes/SPUUpdatePermissionRequest.html">SPUUpdatePermissionRequest</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Classes/SPUUpdater.html">SPUUpdater</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Classes/SPUUpdaterSettings.html">SPUUpdaterSettings</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Classes/SPUUserUpdateState.html">SPUUserUpdateState</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Classes/SUAppcast.html">SUAppcast</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Classes/SUAppcastItem.html">SUAppcastItem</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Classes/SUStandardVersionComparator.html">SUStandardVersionComparator</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Classes/SUUpdatePermissionResponse.html">SUUpdatePermissionResponse</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Classes/SUUpdater.html">SUUpdater</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-group-name">
|
|
<a href="../Constants.html">Constants</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SPULatestAppcastItemFoundKey">SPULatestAppcastItemFoundKey</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SPUNoUpdateFoundReasonKey">SPUNoUpdateFoundReasonKey</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SPUNoUpdateFoundUserInitiatedKey">SPUNoUpdateFoundUserInitiatedKey</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUSparkleErrorDomain">SUSparkleErrorDomain</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUSystemProfilerApplicationNameKey">SUSystemProfilerApplicationNameKey</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUSystemProfilerApplicationVersionKey">SUSystemProfilerApplicationVersionKey</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUSystemProfilerCPU64bitKey">SUSystemProfilerCPU64bitKey</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUSystemProfilerCPUCountKey">SUSystemProfilerCPUCountKey</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUSystemProfilerCPUFrequencyKey">SUSystemProfilerCPUFrequencyKey</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUSystemProfilerCPUSubtypeKey">SUSystemProfilerCPUSubtypeKey</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUSystemProfilerCPUTypeKey">SUSystemProfilerCPUTypeKey</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUSystemProfilerHardwareModelKey">SUSystemProfilerHardwareModelKey</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUSystemProfilerMemoryKey">SUSystemProfilerMemoryKey</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUSystemProfilerOperatingSystemVersionKey">SUSystemProfilerOperatingSystemVersionKey</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUSystemProfilerPreferredLanguageKey">SUSystemProfilerPreferredLanguageKey</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUUpdaterAppcastItemNotificationKey">SUUpdaterAppcastItemNotificationKey</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUUpdaterAppcastNotificationKey">SUUpdaterAppcastNotificationKey</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUUpdaterDidFindValidUpdateNotification">SUUpdaterDidFindValidUpdateNotification</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUUpdaterDidFinishLoadingAppCastNotification">SUUpdaterDidFinishLoadingAppCastNotification</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUUpdaterDidNotFindUpdateNotification">SUUpdaterDidNotFindUpdateNotification</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Constants.html#/c:@SUUpdaterWillRestartNotification">SUUpdaterWillRestartNotification</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-group-name">
|
|
<a href="../Enums.html">Enumerations</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="../Enums/SPUNoUpdateFoundReason.html">SPUNoUpdateFoundReason</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Enums/SPUUpdateCheck.html">SPUUpdateCheck</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Enums/SPUUserUpdateChoice.html">SPUUserUpdateChoice</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Enums/SPUUserUpdateStage.html">SPUUserUpdateStage</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Enums/SUError.html">SUError</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-group-name">
|
|
<a href="../Protocols.html">Protocols</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="../Protocols/SPUStandardUserDriverDelegate.html">SPUStandardUserDriverDelegate</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Protocols/SPUUpdaterDelegate.html">SPUUpdaterDelegate</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Protocols/SPUUserDriver.html">SPUUserDriver</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Protocols/SUUpdaterDelegate.html">SUUpdaterDelegate</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Protocols/SUVersionComparison.html">SUVersionComparison</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Protocols/SUVersionDisplay.html">SUVersionDisplay</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
<div class="footer-wrapper">
|
|
<section id="footer">
|
|
<p>© 2025 <a class="link" href="https://sparkle-project.org" target="_blank" rel="external noopener">Sparkle Project</a>. All rights reserved. (Last updated: 2025-02-23)</p>
|
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.15.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|