Take the steps described in Integrate DevMateKit if you haven't done it yet.
NOTE
It is not necessary to add anything to
SUUpdater
key ininfo.plist
if you make an initial DevMateKit setup. The DevMateKit configured in the way that update XML is already built-in. If you are migrating an application, refer to this article.
Test Updates Integration
- Add a new Object component from 'Object library' to your main XIB file and change its class name to
SUUpdater
. - Connect the
checkForUpdates
action of a newly createdSUUpdater
object with the corresponding menu item or button inside the XIB files. - Build and run your application. Try to update it.
See a GitHub example for more information.
We strongly recommend testing the update procedure before publishing a release. To enable testing mode, do any of the following:
- Set
SUUpdaterIsInTestMode
value to YES/NO in your application user defaults - Implement
SUUpdater
delegate method-isUpdaterInTestMode:
To check how update for beta versions works, do any of the following:
- Set
SUUpdaterChecksForBetaUpdates
value to YES/NO in your application user defaults - Implement
SUUpdater
delegate method-updaterShouldCheckForBetaUpdates:
NOTE
Implemented delegate methods have higher priority than values saved in user preferences. For more information, check the
SUUpdaterDelegate_DevMateInteraction
category in the<DevMateKit/SUUpdater.h>
header file.
Additionally, you can configure updates of your main application bundle from the helper app. Refer to the GitHub example to learn more.
Silent Updates
NOTE
Silent updates are supported in DevMateKit v1.3 and higher. If you have an older version of DevMateKit, consider updating it.
Silent updates are turned off by default. To enable this feature, do the following:
- To turn on automatic check for updates (by default), add the following code snippet when initializing your
SUUpdater
instance:
[SUUpdater sharedUpdater].automaticallyChecksForUpdates = YES;
Alternatively, add the SUEnableAutomaticChecks
key set to YES
into your Info.plist file.
- To turn on automatic download and installation of updates, configure the
SUUpdater
instance:
[SUUpdater sharedUpdater].automaticallyDownloadsUpdates = YES;
We recommend giving your users the choice between silent and manual updates. For example, this capability can be implemented via the corresponding checkboxes in preferences ('Check for updates automatically' and 'Install updates automatically').