This document describes the Sparkle auto-update configuration for Skwad.
Skwad uses Sparkle 2.x for automatic updates. Updates are signed using EdDSA (Ed25519) signatures.
- Public Key (in
Skwad/Info.plist):Ly6mieNPNaFhdYyen9CuMTshryIaSiVHWNAhZ6ZdEOQ= - Private Key: Stored in macOS Keychain under "Sparkle Private Key" and backed up in Bitwarden
- Feed URL:
https://github.com/Kochava-Studios/skwad/releases/latest/download/appcast.xml - Download URL:
https://github.com/Kochava-Studios/skwad/releases/latest/download/Skwad.zip
After building, Sparkle tools are available at:
build/DerivedData/SourcePackages/artifacts/sparkle/Sparkle/bin/
Key tools:
generate_keys- Generate or manage EdDSA keyssign_update- Sign a ZIP file for distribution
When releasing, sign the ZIP before uploading:
./build/DerivedData/SourcePackages/artifacts/sparkle/Sparkle/bin/sign_update build/Skwad.zipThis outputs a signature like:
sparkle:edSignature="..." length="..."
The signature should be added to the appcast.xml <enclosure> tag.
If you lose access to your Keychain (new machine, etc.), restore the private key from Bitwarden:
-
Create a file with the private key:
echo "YOUR_PRIVATE_KEY_FROM_BITWARDEN" > /tmp/sparkle_private_key.txt
-
Import the key:
./build/DerivedData/SourcePackages/artifacts/sparkle/Sparkle/bin/generate_keys -f /tmp/sparkle_private_key.txt
-
Delete the temporary file:
rm /tmp/sparkle_private_key.txt
-
Build the project first to get Sparkle tools:
make build
-
Then import as shown above.
After importing, verify the public key matches:
./build/DerivedData/SourcePackages/artifacts/sparkle/Sparkle/bin/generate_keys -pShould output: Ly6mieNPNaFhdYyen9CuMTshryIaSiVHWNAhZ6ZdEOQ=
# Generate new keys (only do this once!)
./generate_keys
# Print public key
./generate_keys -p
# Export private key to file (for backup)
./generate_keys -x /path/to/backup.txt
# Import private key from file
./generate_keys -f /path/to/backup.txtmake release- Builds, notarizes, generates appcast- Sign the ZIP:
./build/DerivedData/SourcePackages/artifacts/sparkle/Sparkle/bin/sign_update build/Skwad.zip
- Update
build/appcast.xmlwith the signature make upload- Uploads ZIP and appcast to server
Import your private key from Bitwarden (see above).
The public key in Info.plist doesn't match the private key used to sign. Ensure you're using the correct key pair.
If you generate a new key instead of restoring, users on old versions won't be able to update. Always restore from backup!