| Crates.io | tauri-plugin-sparkle-updater |
| lib.rs | tauri-plugin-sparkle-updater |
| version | 0.2.2 |
| created_at | 2025-12-17 07:12:22.150119+00 |
| updated_at | 2025-12-29 00:49:39.269191+00 |
| description | Tauri plugin for macOS app updates using the Sparkle framework |
| homepage | https://github.com/ahonn/tauri-plugin-sparkle-updater |
| repository | https://github.com/ahonn/tauri-plugin-sparkle-updater |
| max_upload_size | |
| id | 1989476 |
| size | 277,808 |
A Tauri plugin that integrates the Sparkle update framework for macOS applications.
# src-tauri/Cargo.toml
[target.'cfg(target_os = "macos")'.dependencies]
tauri-plugin-sparkle-updater = "0.2"
npm install tauri-plugin-sparkle-updater-api
# Download Sparkle framework
curl -fsSL https://raw.githubusercontent.com/ahonn/tauri-plugin-sparkle-updater/refs/heads/master/scripts/download-sparkle.sh | bash
# Generate signing keys (saved to Keychain)
./src-tauri/sparkle-bin/generate_keys
Create src-tauri/Info.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SUFeedURL</key>
<string>https://example.com/appcast.xml</string>
<key>SUPublicEDKey</key>
<string>YOUR_BASE64_PUBLIC_KEY</string>
</dict>
</plist>
{
"bundle": {
"macOS": {
"frameworks": ["path/to/Sparkle.framework"]
}
}
}
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_sparkle_updater::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
use tauri_plugin_sparkle_updater::SparkleUpdaterExt;
fn check_updates(app: &tauri::AppHandle) {
if let Some(updater) = app.sparkle_updater() {
updater.check_for_updates().unwrap();
}
}
Note:
sparkle_updater()returnsNoneduringtauri dev(requires.appbundle).
import {
checkForUpdates,
checkForUpdatesInBackground,
onDidFindValidUpdate,
onDidAbortWithError,
} from 'tauri-plugin-sparkle-updater-api';
// Check with native UI
await checkForUpdates();
// Background check
await checkForUpdatesInBackground();
// Listen for events
await onDidFindValidUpdate((info) => {
console.log(`Update ${info.version} available!`);
});
For Windows/Linux, use the official tauri-plugin-updater:
#[cfg(target_os = "macos")]
builder = builder.plugin(tauri_plugin_sparkle_updater::init());
#[cfg(not(target_os = "macos"))]
builder = builder.plugin(tauri_plugin_updater::Builder::new().build());
MIT