mirror of
https://github.com/sparkle-project/sparkle-project.github.io.git
synced 2025-11-01 15:35:08 +00:00
827 lines
52 KiB
HTML
827 lines
52 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>SPUStandardUserDriverDelegate Protocol 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/Protocol/SPUStandardUserDriverDelegate" class="dashAnchor"></a>
|
|
<a title="SPUStandardUserDriverDelegate Protocol Reference"></a>
|
|
<header>
|
|
<div class="content-wrapper">
|
|
<p>
|
|
<a href="../index.html">Sparkle 2.6.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 Reference</a>
|
|
<img id="carat" src="../img/carat.png" alt=""/>
|
|
</span>
|
|
SPUStandardUserDriverDelegate Protocol Reference
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="wrapper">
|
|
<div class="article-wrapper">
|
|
<article class="main-content">
|
|
<section>
|
|
<section class="section">
|
|
<h1>SPUStandardUserDriverDelegate</h1>
|
|
<div class="declaration">
|
|
<div class="language">
|
|
<p class="aside-title">Objective-C</p>
|
|
<pre class="highlight objective_c"><code><span class="k">@protocol</span> <span class="nc">SPUStandardUserDriverDelegate</span> <span class="o"><</span><span class="n">NSObject</span><span class="o">></span></code></pre>
|
|
|
|
</div>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">protocol</span> <span class="kt">SPUStandardUserDriverDelegate</span> <span class="p">:</span> <span class="kt">NSObjectProtocol</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<p>A protocol for Sparkle’s standard user driver’s delegate</p>
|
|
|
|
<p>This includes methods related to UI interactions</p>
|
|
|
|
</section>
|
|
<section class="section task-group-section">
|
|
<div class="task-group">
|
|
<ul>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverWillShowModalAlert"></a>
|
|
<a name="//apple_ref/objc/Method/-standardUserDriverWillShowModalAlert" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverWillShowModalAlert">-standardUserDriverWillShowModalAlert</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Called before showing a modal alert window,
|
|
to give the opportunity to hide attached windows that may get in the way.</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">standardUserDriverWillShowModalAlert</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">optional</span> <span class="kd">func</span> <span class="nf">standardUserDriverWillShowModalAlert</span><span class="p">()</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverDidShowModalAlert"></a>
|
|
<a name="//apple_ref/objc/Method/-standardUserDriverDidShowModalAlert" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverDidShowModalAlert">-standardUserDriverDidShowModalAlert</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Called after showing a modal alert window,
|
|
to give the opportunity to hide attached windows that may get in the way.</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">standardUserDriverDidShowModalAlert</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">optional</span> <span class="kd">func</span> <span class="nf">standardUserDriverDidShowModalAlert</span><span class="p">()</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverRequestsVersionDisplayer"></a>
|
|
<a name="//apple_ref/objc/Method/-standardUserDriverRequestsVersionDisplayer" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverRequestsVersionDisplayer">-standardUserDriverRequestsVersionDisplayer</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Returns an object that formats version numbers for display to the user.
|
|
If you don’t implement this method or return <code>nil,</code> the standard version formatter will be used.</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">id</span><span class="o"><</span><span class="n"><a href="../Protocols/SUVersionDisplay.html">SUVersionDisplay</a></span><span class="o">></span> <span class="n">_Nullable</span><span class="p">)</span><span class="n">standardUserDriverRequestsVersionDisplayer</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">optional</span> <span class="kd">func</span> <span class="nf">standardUserDriverRequestsVersionDisplayer</span><span class="p">()</span> <span class="o">-></span> <span class="kt"><a href="../Protocols/SUVersionDisplay.html">SUVersionDisplay</a></span><span class="p">?</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverShouldShowVersionHistoryForAppcastItem:"></a>
|
|
<a name="//apple_ref/objc/Method/-standardUserDriverShouldShowVersionHistoryForAppcastItem:" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverShouldShowVersionHistoryForAppcastItem:">-standardUserDriverShouldShowVersionHistoryForAppcastItem:<wbr></a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Decides whether or not the standard user driver should provide an option to show full release notes to the user.</p>
|
|
|
|
<p>When a user checks for new updates and no new update is found, Sparkle by default will offer to show the application’s version history to the user
|
|
by providing a “Version History” button in the no new update available alert.</p>
|
|
|
|
<p>If this delegate method is implemented to return <code>NO</code>, then Sparkle will not provide an option to show full release notes to the user.</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">standardUserDriverShouldShowVersionHistoryForAppcastItem</span><span class="p">:</span>
|
|
<span class="p">(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SUAppcastItem.html">SUAppcastItem</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">item</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">optional</span> <span class="kd">func</span> <span class="nf">standardUserDriverShouldShowVersionHistory</span><span class="p">(</span><span class="k">for</span> <span class="nv">item</span><span class="p">:</span> <span class="kt"><a href="../Classes/SUAppcastItem.html">SUAppcastItem</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt">Bool</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>item</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The appcast item corresponding to the latest version available.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div>
|
|
<h4>Return Value</h4>
|
|
<p><code>YES</code> to allow Sparkle to show full release notes to the user, otherwise <code>NO</code> to disallow this.</p>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverShowVersionHistoryForAppcastItem:"></a>
|
|
<a name="//apple_ref/objc/Method/-standardUserDriverShowVersionHistoryForAppcastItem:" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverShowVersionHistoryForAppcastItem:">-standardUserDriverShowVersionHistoryForAppcastItem:<wbr></a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Handles showing the full release notes to the user.</p>
|
|
|
|
<p>When a user checks for new updates and no new update is found, Sparkle will offer to show the application’s version history to the user
|
|
by providing a “Version History” button in the no new update available alert.</p>
|
|
|
|
<p>If this delegate method is not implemented, Sparkle will instead offer to open the
|
|
<code>fullReleaseNotesLink</code> (or <code>releaseNotesLink</code> if the former is unavailable) from the appcast’s latest <code>item</code> in the user’s web browser.</p>
|
|
|
|
<p>If this delegate method is implemented, Sparkle will instead ask the delegate to show the full release notes to the user.
|
|
A delegate may want to implement this method if they want to show in-app or offline release notes.</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="nf">standardUserDriverShowVersionHistoryForAppcastItem</span><span class="p">:</span>
|
|
<span class="p">(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SUAppcastItem.html">SUAppcastItem</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">item</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">optional</span> <span class="kd">func</span> <span class="nf">standardUserDriverShowVersionHistory</span><span class="p">(</span><span class="k">for</span> <span class="nv">item</span><span class="p">:</span> <span class="kt"><a href="../Classes/SUAppcastItem.html">SUAppcastItem</a></span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>item</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The appcast item corresponding to the latest version available.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverAllowsMinimizableStatusWindow"></a>
|
|
<a name="//apple_ref/objc/Method/-standardUserDriverAllowsMinimizableStatusWindow" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverAllowsMinimizableStatusWindow">-standardUserDriverAllowsMinimizableStatusWindow</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Specifies whether or not the download, extraction, and installing status windows allows to be minimized.</p>
|
|
|
|
<p>By default, the status window showing the current status of the update (download, extraction, ready to install) is allowed to be minimized
|
|
for regular application bundle 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">-</span> <span class="p">(</span><span class="n">BOOL</span><span class="p">)</span><span class="n">standardUserDriverAllowsMinimizableStatusWindow</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">optional</span> <span class="kd">func</span> <span class="nf">standardUserDriverAllowsMinimizableStatusWindow</span><span class="p">()</span> <span class="o">-></span> <span class="kt">Bool</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Return Value</h4>
|
|
<p><code>YES</code> if the status window is allowed to be minimized (default behavior), otherwise <code>NO.</code></p>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(pl)SPUStandardUserDriverDelegate(py)supportsGentleScheduledUpdateReminders"></a>
|
|
<a name="//apple_ref/objc/Property/supportsGentleScheduledUpdateReminders" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(pl)SPUStandardUserDriverDelegate(py)supportsGentleScheduledUpdateReminders">supportsGentleScheduledUpdateReminders</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Declares whether or not gentle scheduled update reminders are supported.</p>
|
|
|
|
<p>The delegate may implement scheduled update reminders that are presented in a gentle manner by implementing one or both of:
|
|
<code><a href="../Protocols/SPUStandardUserDriverDelegate.html#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverWillHandleShowingUpdate:forUpdate:state:">-standardUserDriverWillHandleShowingUpdate:forUpdate:state:</a></code> and <code><a href="../Protocols/SPUStandardUserDriverDelegate.html#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverShouldHandleShowingScheduledUpdate:andInImmediateFocus:">-standardUserDriverShouldHandleShowingScheduledUpdate:andInImmediateFocus:</a></code></p>
|
|
|
|
<p>Visit <a href="https://sparkle-project.org/documentation/gentle-reminders">https://sparkle-project.org/documentation/gentle-reminders</a> for more information and examples.</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">@optional</span>
|
|
<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">supportsGentleScheduledUpdateReminders</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">optional</span> <span class="k">var</span> <span class="nv">supportsGentleScheduledUpdateReminders</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>
|
|
<div>
|
|
<h4>Return Value</h4>
|
|
<p><code>YES</code> if gentle scheduled update reminders are implemented by standard user driver delegate, otherwise <code>NO</code> (default).</p>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverShouldHandleShowingScheduledUpdate:andInImmediateFocus:"></a>
|
|
<a name="//apple_ref/objc/Method/-standardUserDriverShouldHandleShowingScheduledUpdate:andInImmediateFocus:" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverShouldHandleShowingScheduledUpdate:andInImmediateFocus:">-standardUserDriverShouldHandleShowingScheduledUpdate:<wbr>andInImmediateFocus:<wbr></a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Specifies if the standard user driver should handle showing a new scheduled update, or if its delegate should handle showing the update instead.</p>
|
|
|
|
<p>If you implement this method and return <code>NO</code> the delegate is then responsible for showing the update,
|
|
which must be implemented and done in <code><a href="../Protocols/SPUStandardUserDriverDelegate.html#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverWillHandleShowingUpdate:forUpdate:state:">-standardUserDriverWillHandleShowingUpdate:forUpdate:state:</a></code>
|
|
The motivation for the delegate being responsible for showing updates is to override Sparkle’s default behavior
|
|
and add gentle reminders for new updates.</p>
|
|
|
|
<p>Returning <code>YES</code> is the default behavior and allows the standard user driver to handle showing the update.</p>
|
|
|
|
<p>If the standard user driver handles showing the update, <code>immediateFocus</code> reflects whether or not it will show the update in immediate and utmost focus.
|
|
The standard user driver may choose to show the update in immediate and utmost focus when the app was launched recently
|
|
or the system has been idle for some time.</p>
|
|
|
|
<p>If <code>immediateFocus</code> is <code>NO</code> the standard user driver may want to defer showing the update until the user comes back to the app.
|
|
For background running applications, when <code>immediateFocus</code> is <code>NO</code> the standard user driver will always want to show
|
|
the update alert immediately, but behind other running applications or behind the app’s own windows if it’s currently active.</p>
|
|
|
|
<p>There should be no side effects made when implementing this method so you should just return <code>YES</code> or <code>NO</code>
|
|
You will also want to implement <code><a href="../Protocols/SPUStandardUserDriverDelegate.html#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverWillHandleShowingUpdate:forUpdate:state:">-standardUserDriverWillHandleShowingUpdate:forUpdate:state:</a></code> for adding additional update reminders.</p>
|
|
|
|
<p>This method is not called for user-initiated update checks. The standard user driver always handles those.</p>
|
|
|
|
<p>Visit <a href="https://sparkle-project.org/documentation/gentle-reminders">https://sparkle-project.org/documentation/gentle-reminders</a> for more information and examples.</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">standardUserDriverShouldHandleShowingScheduledUpdate</span><span class="p">:</span>
|
|
<span class="p">(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SUAppcastItem.html">SUAppcastItem</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">update</span>
|
|
<span class="nf">andInImmediateFocus</span><span class="p">:</span>
|
|
<span class="p">(</span><span class="n">BOOL</span><span class="p">)</span><span class="nv">immediateFocus</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">optional</span> <span class="kd">func</span> <span class="nf">standardUserDriverShouldHandleShowingScheduledUpdate</span><span class="p">(</span><span class="n">_</span> <span class="nv">update</span><span class="p">:</span> <span class="kt"><a href="../Classes/SUAppcastItem.html">SUAppcastItem</a></span><span class="p">,</span> <span class="n">andInImmediateFocus</span> <span class="nv">immediateFocus</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Bool</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>update</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The update the standard user driver should show.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>immediateFocus</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>If <code>immediateFocus</code> is <code>YES,</code> then the standard user driver proposes to show the update in immediate and utmost focus. See discussion for more details.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div>
|
|
<h4>Return Value</h4>
|
|
<p><code>YES</code> if the standard user should handle showing the scheduled update (default behavior), otherwise <code>NO</code> if the delegate handles showing it.</p>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverWillHandleShowingUpdate:forUpdate:state:"></a>
|
|
<a name="//apple_ref/objc/Method/-standardUserDriverWillHandleShowingUpdate:forUpdate:state:" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverWillHandleShowingUpdate:forUpdate:state:">-standardUserDriverWillHandleShowingUpdate:<wbr>forUpdate:<wbr>state:<wbr></a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Called before an update will be shown to the user.</p>
|
|
|
|
<p>If the standard user driver handles showing the update, <code>handleShowingUpdate</code> will be <code>YES</code>.
|
|
Please see <code><a href="../Protocols/SPUStandardUserDriverDelegate.html#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverShouldHandleShowingScheduledUpdate:andInImmediateFocus:">-standardUserDriverShouldHandleShowingScheduledUpdate:andInImmediateFocus:</a></code> for how the standard user driver
|
|
may handle showing scheduled updates when <code>handleShowingUpdate</code> is <code>YES</code> and <code>state.userInitiated</code> is <code>NO</code>.</p>
|
|
|
|
<p>If the delegate declared it handles showing the update by returning <code>NO</code> in <code><a href="../Protocols/SPUStandardUserDriverDelegate.html#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverShouldHandleShowingScheduledUpdate:andInImmediateFocus:">-standardUserDriverShouldHandleShowingScheduledUpdate:andInImmediateFocus:</a></code>
|
|
then the delegate should handle showing update reminders in this method, or at some later point.
|
|
In this case, <code>handleShowingUpdate</code> will be <code>NO.</code>
|
|
To bring the update alert in focus, you may call <code><a href="../Classes/SPUStandardUpdaterController.html#/c:objc(cs)SPUStandardUpdaterController(im)checkForUpdates:">-[SPUStandardUpdaterController checkForUpdates:]</a></code> or <code><a href="../Classes/SPUUpdater.html#/c:objc(cs)SPUUpdater(im)checkForUpdates">-[SPUUpdater checkForUpdates]</a></code>.
|
|
You may want to show additional UI indicators in your application that will show this update in focus
|
|
and want to dismiss additional UI indicators in <code><a href="../Protocols/SPUStandardUserDriverDelegate.html#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverWillFinishUpdateSession">-standardUserDriverWillFinishUpdateSession</a></code> or <code><a href="../Protocols/SPUStandardUserDriverDelegate.html#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverDidReceiveUserAttentionForUpdate:">-standardUserDriverDidReceiveUserAttentionForUpdate:</a></code></p>
|
|
|
|
<p>If <code>state.userInitiated</code> is <code>YES</code> then the standard user driver always handles showing the new update and <code>handleShowingUpdate</code> will be <code>YES.</code>
|
|
In this case, it may still be useful for the delegate to intercept this method right before a new update will be shown.</p>
|
|
|
|
<p>This method is not called when bringing an update that has already been presented back in focus.</p>
|
|
|
|
<p>Visit <a href="https://sparkle-project.org/documentation/gentle-reminders">https://sparkle-project.org/documentation/gentle-reminders</a> for more information and examples.</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="nf">standardUserDriverWillHandleShowingUpdate</span><span class="p">:(</span><span class="n">BOOL</span><span class="p">)</span><span class="nv">handleShowingUpdate</span>
|
|
<span class="nf">forUpdate</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SUAppcastItem.html">SUAppcastItem</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">update</span>
|
|
<span class="nf">state</span><span class="p">:</span>
|
|
<span class="p">(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SPUUserUpdateState.html">SPUUserUpdateState</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">state</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">optional</span> <span class="kd">func</span> <span class="nf">standardUserDriverWillHandleShowingUpdate</span><span class="p">(</span><span class="n">_</span> <span class="nv">handleShowingUpdate</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">,</span> <span class="n">forUpdate</span> <span class="nv">update</span><span class="p">:</span> <span class="kt"><a href="../Classes/SUAppcastItem.html">SUAppcastItem</a></span><span class="p">,</span> <span class="nv">state</span><span class="p">:</span> <span class="kt"><a href="../Classes/SPUUserUpdateState.html">SPUUserUpdateState</a></span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>handleShowingUpdate</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p><code>YES</code> if the standard user driver handles showing the update, otherwise <code>NO</code> if the delegate handles showing the update.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>update</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The update that will be shown.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>state</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The user state of the update which includes if the update check was initiated by the user.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverDidReceiveUserAttentionForUpdate:"></a>
|
|
<a name="//apple_ref/objc/Method/-standardUserDriverDidReceiveUserAttentionForUpdate:" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverDidReceiveUserAttentionForUpdate:">-standardUserDriverDidReceiveUserAttentionForUpdate:<wbr></a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Called when a new update first receives attention from the user.</p>
|
|
|
|
<p>This occurs either when the user first brings the update alert in utmost focus or when the user makes a choice to install an update or dismiss/skip it.</p>
|
|
|
|
<p>This may be useful to intercept for dismissing custom attention-based UI indicators (e.g, user notifications) introduced when implementing
|
|
<code><a href="../Protocols/SPUStandardUserDriverDelegate.html#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverWillHandleShowingUpdate:forUpdate:state:">-standardUserDriverWillHandleShowingUpdate:forUpdate:state:</a></code></p>
|
|
|
|
<p>For custom UI indicators that need to still be on screen after the user has started to install an update, please see <code><a href="../Protocols/SPUStandardUserDriverDelegate.html#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverWillFinishUpdateSession">-standardUserDriverWillFinishUpdateSession</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="nf">standardUserDriverDidReceiveUserAttentionForUpdate</span><span class="p">:</span>
|
|
<span class="p">(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SUAppcastItem.html">SUAppcastItem</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">update</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">optional</span> <span class="kd">func</span> <span class="nf">standardUserDriverDidReceiveUserAttention</span><span class="p">(</span><span class="n">forUpdate</span> <span class="nv">update</span><span class="p">:</span> <span class="kt"><a href="../Classes/SUAppcastItem.html">SUAppcastItem</a></span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>update</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The new update that the user gave attention to.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverWillFinishUpdateSession"></a>
|
|
<a name="//apple_ref/objc/Method/-standardUserDriverWillFinishUpdateSession" class="dashAnchor"></a>
|
|
<a class="token" href="#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverWillFinishUpdateSession">-standardUserDriverWillFinishUpdateSession</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Called before the standard user driver session will finish its current update session.</p>
|
|
|
|
<p>This may occur after the user has dismissed / skipped a new update or after an update error has occurred.
|
|
For updaters updating external/other bundles, this may also be called after an update has been successfully installed.</p>
|
|
|
|
<p>This may be useful to intercept for dismissing custom UI indicators introduced when implementing
|
|
<code><a href="../Protocols/SPUStandardUserDriverDelegate.html#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverWillHandleShowingUpdate:forUpdate:state:">-standardUserDriverWillHandleShowingUpdate:forUpdate:state:</a></code></p>
|
|
|
|
<p>For UI indicators that need to be dismissed when the user has given attention to a new update alert,
|
|
please see <code><a href="../Protocols/SPUStandardUserDriverDelegate.html#/c:objc(pl)SPUStandardUserDriverDelegate(im)standardUserDriverDidReceiveUserAttentionForUpdate:">-standardUserDriverDidReceiveUserAttentionForUpdate:</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">standardUserDriverWillFinishUpdateSession</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">optional</span> <span class="kd">func</span> <span class="nf">standardUserDriverWillFinishUpdateSession</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>© 2024 <a class="link" href="https://sparkle-project.org" target="_blank" rel="external noopener">Sparkle Project</a>. All rights reserved. (Last updated: 2024-03-28)</p>
|
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|