GitHubUpdates is Cocoa framework to install application updates from GitHub releases.
If you ever used Sparkle, this project provided the same kind of functionalities, but works with your GitHub releases and tags.
Documentation and API reference can be found at: http://doc.xs-labs.com/GitHubUpdates/
How to use
The project provides a Cocoa framework that you can embed into your own application.
A module is also defined, so you can either use:
In order to check for updates, a
GitHubUpdater object needs to be created:
self.updater = [ GitHubUpdater new ]; self.updater.user = @"MyGitHubUsername" self.updater.repository = @"MyGitHubRepository";
Note that you can also create the
GitHubUpdater instance with InterfaceBuilder.
repository properties are inspectable, so you can set them with the Interface Builder inspector palette.
You can then check for updates using the IB action:
[ self.updater checkForUpdates: nil ];
This method will show a progress window, while checking for available updates.
You can also choose to check for updates in background:
[ self.updater checkForUpdatesInBackground ];
With this method, the update window will only be shown if an update is available.
You can also check for updates periodically, using a timer:
[ NSTimer scheduledTimerWithTimeInterval: 3600 target: self.updater selector: @selector( checkForUpdatesInBackground ) userInfo: nil repeats: YES ];
This will check for updates every hour.
Create a release on GitHub
GitHubUpdates will check your GitHub tags to see if an update is available.
Your tags should correspond to the application's version number, as in
There's no built-in support for
CFBundleVersion, but that behaviour can be customized with
GitHubUpdaterDelegate if needed.
Tags can be created on GitHub the following way:
git tag 0.1.2 -m "0.1.2" git push origin --tags
Once you created a new tag, you'll need to upload a ZIP archive or a DMG file of your application to GitHub.
Also note that your application should be at the first level of the ZIP archive or the DMG file.
Note that the installer will check the value of
CFBundleIdentifier, so they need to match.
For obvious security reasons, the installer will also check code-signing properties.
While you can use GitHubUpdates without code-signing, the installer will refuse to install a non code-signed version, if the current version is code-signed. Code-signing identities are also checked, and the installer will refuse to install an update if there's a mismatch in the code-signing identities.
GitHubUpdates is released under the terms of the MIT license.
Owner: Jean-David Gadina - XS-Labs Web: www.xs-labs.com Blog: www.noxeos.com Twitter: @macmade GitHub: github.com/macmade LinkedIn: ch.linkedin.com/in/macmade/ StackOverflow: stackoverflow.com/users/182676/macmade