Files
sparkle-project.github.io/documentation/api-reference/index.html
T
2025-09-16 05:19:13 +00:00

272 lines
16 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>Sparkle 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 title="Sparkle Reference"></a>
<header>
<div class="content-wrapper">
<p>
<a href="index.html">Sparkle 2.8.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>
</span>
</p>
</div>
</div>
<div class="wrapper">
<div class="article-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1 id='sparkle-2-img-src-https-github-com-sparkle-project-sparkle-workflows-build-20-26-20tests-badge-svg-branch-2-x-alt-build-status-img-src-https-img-shields-io-badge-swiftpm-compatible-4bc51d-svg-style-flat-alt-swiftpm-a-href-https-github-com-carthage-carthage-img-src-https-img-shields-io-badge-carthage-compatible-4bc51d-svg-style-flat-alt-carthage-compatible-a-a-href-https-cocoapods-org-pods-sparkle-img-src-https-img-shields-io-cocoapods-v-sparkle-svg-cacheseconds-86400-alt-cocoapods-a' class='heading'>Sparkle 2 <img src="https://github.com/sparkle-project/Sparkle/workflows/Build%20%26%20Tests/badge.svg?branch=2.x" alt="Build Status"> <img src="https://img.shields.io/badge/SwiftPM-compatible-4BC51D.svg?style=flat" alt="SwiftPM"> <a href="https://github.com/Carthage/Carthage"><img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" alt="Carthage compatible"></a> <a href="https://cocoapods.org/pods/Sparkle"><img src="https://img.shields.io/cocoapods/v/Sparkle.svg?cacheSeconds=86400" alt="CocoaPods"></a></h1>
<p>Secure and reliable software update framework for macOS.</p>
<p><img src="Resources/Screenshot2.png" width="732" alt="Sparkle shows familiar update window with release notes"></p>
<p>Sparkle 2 adds support for application sandboxing, custom user interfaces, updating external bundles, and a more modern architecture which includes faster and more reliable installs.</p>
<p>Pre-releases when available can be found on the <a href="https://github.com/sparkle-project/Sparkle/releases">Sparkle&rsquo;s Releases</a> or on your favorite package manager. More nightly builds can be downloaded by selecting a recent <a href="https://github.com/sparkle-project/Sparkle/actions?query=event%3Apush+is%3Asuccess+branch%3A2.x">workflow run</a> and downloading the corresponding Sparkle-distribution artifact.</p>
<p>The current status for future versions of Sparkle is tracked by <a href="https://github.com/sparkle-project/Sparkle/milestones">its roadmap</a>.</p>
<p>Please visit <a href="http://sparkle-project.org">Sparkle&rsquo;s website</a> for up to date documentation on using and migrating over to Sparkle 2. Refer to <a href="CHANGELOG">Changelog</a> for a more detailed list of changes. More internal design documents to the project can be found in the repository under <a href="Documentation/">Documentation</a>.</p>
<h2 id='features' class='heading'>Features</h2>
<ul>
<li>Seamless. There&rsquo;s no mention of Sparkle; your icons and app name are used.</li>
<li>Secure. Updates are verified using EdDSA signatures and Apple Code Signing. Supports Sandboxed applications in Sparkle 2.</li>
<li>Fast. Supports delta updates which only patch files that have changed and atomic-safe installs.</li>
<li>Easy to install. Sparkle requires no code in your app, and only needs static files on a web server.</li>
<li>Customizable. Sparkle 2 supports plugging in a custom UI for updates.</li>
<li>Flexible. Supports applications, package installers, preference panes, and other plug-ins. Sparkle 2 supports updating external bundles.</li>
<li>Handles permissions, quarantine, and automatically asks for authentication if needed.</li>
<li>Uses RSS-based appcasts for release information. Appcasts are a de-facto standard supported by 3rd party update-tracking programs and websites.</li>
<li>Stays hidden until second launch for better first impressions.</li>
<li>Truly self-updating — the user can choose to automatically download and install all updates in the background.</li>
<li>Ability to use channels for beta updates (in Sparkle 2), add phased rollouts to users, and mark updates as critical or major.</li>
<li>Progress and status notifications for the host app.</li>
</ul>
<h2 id='requirements' class='heading'>Requirements</h2>
<ul>
<li>Runtime: macOS 10.13 or later.</li>
<li>Build: Latest major Xcode (stable or beta, whichever is latest) and one major version less.</li>
<li>HTTPS server for serving updates (see <a href="http://sparkle-project.org/documentation/app-transport-security/">App Transport Security</a>)</li>
</ul>
<h2 id='usage' class='heading'>Usage</h2>
<p>See <a href="https://sparkle-project.org/documentation/">getting started guide</a>. No code is necessary, but a bit of configuration is required.</p>
<h3 id='troubleshooting' class='heading'>Troubleshooting</h3>
<ul>
<li><p>Please check <strong>Console.app</strong> for logs under your application. Sparkle prints detailed information there about all problems it encounters. It often also suggests solutions to the problems, so please read Sparkle&rsquo;s log messages carefully.</p></li>
<li><p>Use the <code>generate_appcast</code> tool which creates appcast files, correct signatures, and delta updates automatically.</p></li>
<li><p>Make sure the URL specified in <a href="https://sparkle-project.org/documentation/customization/"><code>SUFeedURL</code></a> is valid (typos/404s are a common error!), and that it uses modern TLS (<a href="https://www.ssllabs.com/ssltest/">test it</a>).</p></li>
</ul>
<h3 id='api-symbols' class='heading'>API symbols</h3>
<p>Sparkle is built with <code>-fvisibility=hidden -fvisibility-inlines-hidden</code> which means no symbols are exported by default.
If you are adding a symbol to the public API you must decorate the declaration with the <code>SU_EXPORT</code> macro (grep the source code for examples).</p>
<h3 id='building-the-distribution-package' class='heading'>Building the distribution package</h3>
<p>You do not usually need to build a Sparkle distribution unless you&rsquo;re making changes to Sparkle itself.</p>
<p>To build a Sparkle distribution, <code>cd</code> to the root of the Sparkle source tree and run <code>make release</code>. Sparkle-<em>VERSION</em>.tar.xz will be created and revealed in Finder after the build has completed.</p>
<p>Alternatively, build the Distribution scheme in the Xcode UI.</p>
<h3 id='code-of-conduct' class='heading'>Code of Conduct</h3>
<p>We pledge to have an open and welcoming environment. See our <a href="CODE_OF_CONDUCT.md">Code of Conduct</a>.</p>
</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>&copy; 2025 <a class="link" href="https://sparkle-project.org" target="_blank" rel="external noopener">Sparkle Project</a>. All rights reserved. (Last updated: 2025-09-16)</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>