From 8ecbb2527426d445dd85458ee90b94888dfb02fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesin=CC=81ski?= Date: Tue, 29 Jul 2014 02:05:12 +0100 Subject: [PATCH] Warn when version is missing --- Sparkle/SUAppcastItem.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sparkle/SUAppcastItem.m b/Sparkle/SUAppcastItem.m index ea72dd2d..02b0c955 100644 --- a/Sparkle/SUAppcastItem.m +++ b/Sparkle/SUAppcastItem.m @@ -80,6 +80,8 @@ newVersion = dict[@"sparkle:version"]; // Get version from the item, in case it's a download-less item (i.e. paid upgrade). if (newVersion == nil) // no sparkle:version attribute anywhere? { + SULog(@"warning: for URL '%@' is missing sparkle:version attribute. Version comparison may be unreliable. Please always specify sparkle:version", enclosure[@"url"]); + // Separate the url by underscores and take the last component, as that'll be closest to the end, // then we remove the extension. Hopefully, this will be the version. NSArray *fileComponents = [enclosure[@"url"] componentsSeparatedByString:@"_"];