Tauri plugin for macOS app updates using the Sparkle framework
npm install tauri-plugin-sparkle-updater-api


A Tauri plugin that integrates the Sparkle update framework for macOS applications.
- Native macOS update UI via Sparkle framework
- EdDSA (Ed25519) signature verification
- Automatic and background update checks
- Full event system for custom UI integration
- Channel-based updates, custom HTTP headers, phased rollout
- TypeScript/JavaScript API with full type definitions
- macOS 11.0+
- Tauri 2.x
- Sparkle framework 2.8.1
``toml`src-tauri/Cargo.toml
[target.'cfg(target_os = "macos")'.dependencies]
tauri-plugin-sparkle-updater = "0.2"
`bash`
npm install tauri-plugin-sparkle-updater-api
`bashDownload Sparkle framework
curl -fsSL https://raw.githubusercontent.com/ahonn/tauri-plugin-sparkle-updater/refs/heads/master/scripts/download-sparkle.sh | bash
$3
Create
src-tauri/Info.plist:`xml
SUFeedURL
https://example.com/appcast.xml
SUPublicEDKey
YOUR_BASE64_PUBLIC_KEY
`$3
`json
{
"bundle": {
"macOS": {
"frameworks": ["path/to/Sparkle.framework"]
}
}
}
`$3
`rust
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_sparkle_updater::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
`Basic Usage
$3
`rust
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() returns None during tauri dev (requires .app bundle).$3
`ts
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!);
});
`Documentation
- API Reference (docs.rs) - Rust API documentation
- Publishing - Signing and CI/CD workflow
- Sparkle Documentation - Appcast format, configuration keys, sandboxing
Cross-Platform
For Windows/Linux, use the official tauri-plugin-updater:
`rust
#[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