Migrating away from DevMate: redirecting Sparkle updates
September 2019
DevMate is the service I use to gather download and install statistics for most of my apps. It also serves the update feeds for all non-Mac App Store apps. Earlier this year DevMate announced its retiring the platform in December.
In this post I’ll outline how I’m preparing my apps to migrate to a new update feed. Christian Tietze mentions asking DevMate to point the Sparkle update feed to a new location. He also recommends to not rely on DevMate’s redirect to work forever. That’s where my approach comes in.
I urge you to take control over the feed URL entirely and redirect it yourself. DevMateKit uses Sparkle under the hood. This means a custom update URL can be specified by implementing a Sparkle delegate method.
Setting the URL
class ApplicationCoordinator: NSObject, Coordinator {
...
private func configureUpdates() {
DM_SUUpdater.shared().delegate = self
}
}
extension ApplicationCoordinator: DM_SUUpdaterDelegate_DevMateInteraction {
func feedURLString(for updater: DM_SUUpdater) -> String? {
if Defaults.shared.isEnabled(setting: .betaUpdates) {
return .appcastBetaURLString
} else {
return .appcastURLString
}
}
}
extension String {
static let appcastURLString = "https://updates.dangr.co/\(Bundle.main.bundleIdentifier!)/appcast.xml"
static let appcastBetaURLString = "https://updates.dangr.co/\(Bundle.main.bundleIdentifier!)/beta-appcast.xml"
}
After this change Timeless will check for updates at updates.dangr.co
. I can set redirects for this domain however I want.
Redirecting
I use Netlify to handle the redirects. Here’s what that looks like:
com.dangercove.Timeless.Mac/appcast.xml* https://updates.devmate.com/com.dangercove.Timeless.Mac.xml:splat 301
com.dangercove.Timeless.Mac/beta-appcast.xml* https://updates.devmate.com/beta/com.dangercove.Timeless.Mac.xml:splat 301
As you can see I currently redirect to the feed at DevMate, but I can redirect it anywhere else whenever I want. This allows me to use DevMate for as long as possible and switch to any other service that uses Sparkle. I’m keeping a close eye on App Center by Microsoft. They put Sparkle feeds for macOS on the roadmap for September.