mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-30 05:28:50 +00:00
Check OS version before creating downloader
This commit is contained in:
1 parent
429f950434
commit
1cc5f230a5
1 file changed
+6
-1
Vendored
+6
-1
@@ -283,7 +283,12 @@
|
||||
withRequest:request];
|
||||
}
|
||||
// TODO: SPUDownloaderDeprecated vs SPUDownloaderSession
|
||||
self.download = [[SPUDownloaderDeprecated alloc] initWithDelegate:self];
|
||||
if ([SUOperatingSystem isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){10, 9, 0}]) {
|
||||
self.download = [[SPUDownloaderSession alloc] initWithDelegate:self];
|
||||
}
|
||||
else {
|
||||
self.download = [[SPUDownloaderDeprecated alloc] initWithDelegate:self];
|
||||
}
|
||||
SPUURLRequest *urlRequest = [SPUURLRequest URLRequestWithRequest:request];
|
||||
NSString *desiredFilename = [NSString stringWithFormat:@"%@ %@", [self.host name], [self.updateItem versionString]];
|
||||
[self.download startPersistentDownloadWithRequest:urlRequest bundleIdentifier:bundleIdentifier desiredFilename:desiredFilename];
|
||||
|
||||
Reference in new issue
Block a user