Sparkle in Xojo?

Is it possible to use the Sparkle update framework within a Mac app made with Xojo? If so, how is it done?

For those not familiar with it, here’s the Sparkle website:

http://sparkle-project.org

If Sparkle isn’t an option, does anyone have any tips on how to manage updates in a Xojo app?

Thanks in advance!

I don’t actually use it but the subject comes up from time to time.

https://www.monkeybreadsoftware.net/topic-sparkle.shtml

Some things to note with Sparkle:

#1 Don’t use with an App Store application, Apple will reject your application.
#2 Doesn’t work with Sandboxed applications.
#3 Be careful with the Sparkle framework, I’ve had a couple of App Wrapper customers who couldn’t code sign their application because the copy of the Sparkle framework was corrupted.

Apart from that, I’ve seen many people using it.

Although using Xojo’s HTTPSocket, it’s not too difficult to roll your own.

If your application is Sandboxed, you do need to roll your own (ASFAIK). You can use an Apple Installer as your update file. You can also check the signature on the installer to validate it came from you. (App Wrapper can create a signed Apple installer).

Well Paul Lefebvre http://www.logicalvue.com did a good job with his Ultra Updater Kit couple of years ago. I’ve bought the source code, fine tunend it for my projects and weiserer and still using it today for all my Windows and Mac Apps outside the App Store. Apps with included UltraUpdater code won’t be rejected by Apple if you are not using it.

But it seems he pulled it in the meantime so maybe he reads this and decides to give us the UltraUpdater back again? Would be an alternative to Sparkle.

weiserer = webserver
sometimes I hate the autocorrect functionality when switching between langauges… and I cant edit my post… grrrr…

Well, we have classes for that in MBS Plugin.
http://www.monkeybreadsoftware.net/pluginpart-sparklecocoa.shtml

Also we use it in the Updater Kit.
http://www.monkeybreadsoftware.de/xojo/UpdaterKit/

In general, you can’T use current 1.8 version of Sparkle in Xojo as it’s 64 bit. But older versions work fine.

If people are interested, I can extract my code and then offer it also.

We’ve used the MBS Updater Kit for years. Well, we’ve tweaked it to fit our workflow, but the it’s the basis for what we do for ourselves and our clients.

IMO, if you don’t want to spend a lot of time figuring it out for yourself then the MBS Updater Kit is a good investment.

Thanks for all the replies! I’ve been busy and plain forgot about this discussion… :slight_smile:

I’ve been thinking that Sparkle may be overkill for my purposes. It’s a pretty simple, self-contained app, with no App Store or sandboxing issues to worry about. (It’s not in the App Store, and never will be, because some of the things it needs to do aren’t allowed in App Store apps.)

I could just download the newest version of the app using an HTTPSocket… but then how would I replace the currently-running app with the new copy without requiring user intervention?

That’s why Sparkle is so handy on the Mac. It grabs the app, downloads it, verifies it against the checksum, and then after asks the user if they want to install. If they say yes, the app quits and is replaced by the new version and restarted.

FWIW, the MBS Updater Kit also works on Windows too. It downloads the Installer (needs to be installer) and does the same thing. Quits the app and runs the installer executable.

Once you get the hang of it it’s pretty easy.

I’m actually working on a very easy to use module (100% native Xojo, no need for plugins), that includes similar functionality to Sparkle. Additionally, it will include functionality for showing notifications to the user (e.g. for announcements about your product).

One of the unique features of the module will be the way you set everything up. All you need to do is add two Build Steps and include the module in your project. The Build Steps initialize the auto-update system and create an update package containing a signed update archive (using a public/private DSA key pair, which is also automatically generated by the Build Step) and a feed file (like the AppCast file you would use with Sparkle).

No need to manually sign anything or create AppCast files! All you need to do manually is create a HTML file containing the release notes (a sample file will be included) and upload it - together with the generated update package - to your web server. The module will handle the rest, from checking for updates to installing and launching the updated application.

Initially the module will be OS X-only (10.7 and up), but I do have plans for extending it’s functionality to Windows and maybe even Linux.

I’ll be officially announcing the module as soon as it is ready.
If you are interested in the module, please let me know so I have an idea of the amount of interested people.

I am using the previous version that Joris made for all my apps and it works flawless. Always worked as expected and way easier to setup compared to Sparkle. It behaves and looks like Sparkle so users are familiar with it (read: see no difference with Sparkle)

Looking forward to the new version !!

Joris, your module sounds great. Windows support is essential for us to adopt it.

I look forward to playing with it!

Sam: your module is Mac-only ?

Correct, the code I’ve written is specifically for OS X, maybe if I explain how it works, Joris can use that information to provide a full x-plat kit (in native Xojo code).

I start with a version simple update format, a sample file can be found here.
http://www.ohanaware.com/appwrapper/AppWrapper.v7Update

In the file it contains the following:

signature - which a hash of the entire file contents. beginUpdate - which is used to signal update information follows. build - which ties into the non-release version (so it's a simple comparison). releaseDate - the date the update was released. minOS - contains the required OS for this update. architecture - the architectures it will run on. displayVersion - Human readable version i.e 3.0 Beta 1 changes - a list of changes (URLEncoded) downloadSize - a human readable string i.e. 8 MB fileSiganture - a hash of the update file.

Each file may contain multiple versions, with the latest always appearing at the top.

When it’s time to check, my app uses a HTTPSocket to download the update file, then processes it into an array of objects and scans each object to see if it’s newer than the current version and meets the architecture, minOS requirements, then it will add it to the list of available updates.

it then displays all the available update information, but only offers the option to download the latest available update.

When the user choose to update, it then uses the same HTTPSocket to download the update file to it’s Application Support folder.

Once it’s downloaded, if launches the update file (I’m using the Apple Installer package for updates) and quits the current application.

Using the Apple installer, will locate and replace the current version with the newer version, asking admin credentials if required.

In the future I intend to update it to verify the code signature of the package (at the moment it verifies a hash of the file against the fileSignature (but that can be hacked if someone figures out which hashing method I’m using and the salting string. However having the app on the machine verify the code signature of the installer will ensure the highest level of security (IMHO).

I also want to get my app to clean up the installer, if it was used successfully, a bit more design is required.

I hope that this helps.

[quote=135699:@Joris Vervuurt]I’m actually working on a very easy to use module (100% native Xojo, no need for plugins), that includes similar functionality to Sparkle. Additionally, it will include functionality for showing notifications to the user (e.g. for announcements about your product).

One of the unique features of the module will be the way you set everything up. All you need to do is add two Build Steps and include the module in your project. The Build Steps initialize the auto-update system and create an update package containing a signed update archive (using a public/private DSA key pair, which is also automatically generated by the Build Step) and a feed file (like the AppCast file you would use with Sparkle).

No need to manually sign anything or create AppCast files! All you need to do manually is create a HTML file containing the release notes (a sample file will be included) and upload it - together with the generated update package - to your web server. The module will handle the rest, from checking for updates to installing and launching the updated application.

Initially the module will be OS X-only (10.7 and up), but I do have plans for extending it’s functionality to Windows and maybe even Linux.

I’ll be officially announcing the module as soon as it is ready.
If you are interested in the module, please let me know so I have an idea of the amount of interested people.[/quote]
Any further news on this, Joris?

In the meantime, take a look at Kaju. It’s cross-platform, open-source, and comes with an admin app that lets you set it all up.

https://github.com/ktekinay/kaju

Thank you, Kem.

Checking it out now.

Simon.