diff --git a/Dash/DHAppDelegate.m b/Dash/DHAppDelegate.m index 8fee2765..84ed65d9 100644 --- a/Dash/DHAppDelegate.m +++ b/Dash/DHAppDelegate.m @@ -190,7 +190,7 @@ - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application NSLog(@"did receive memory warning"); } -- (void)application:(UIApplication *)application handleEventsForBackgroundURLSession:(NSString *)identifier completionHandler:(void (^)())completionHandler +- (void)application:(UIApplication *)application handleEventsForBackgroundURLSession:(NSString *)identifier completionHandler:(void (^)(void))completionHandler { [[NSOperationQueue mainQueue] addOperationWithBlock:^{ completionHandler(); @@ -246,7 +246,7 @@ - (void)checkCommitHashes @"DHDBUnifiedOperation": @"1671a905", @"DHWebViewController": @"0bc6a10d", @"DHWebPreferences": @"cd091ec9", - @"DHDocsetDownloader": @"82da84c0", + @"DHDocsetDownloader": @"7d7e0b32", @"PlatformIcons": @"82da84c0", @"DHTypes": @"5ed28f56", @"Types": @"5ed28f56", diff --git a/Dash/DHDocsetDownloader.m b/Dash/DHDocsetDownloader.m index e7f81be5..838f0107 100644 --- a/Dash/DHDocsetDownloader.m +++ b/Dash/DHDocsetDownloader.m @@ -205,7 +205,7 @@ - (void)setUp // doesn't get called unless you call the singleton from DHAppDele [DHFeed feedWithFeed:@"Stylus.xml" icon:@"stylus" aliases:@[@"nodejs", @"node.js"] doesNotHaveVersions:NO], [DHFeed feedWithFeed:@"Susy.xml" icon:@"susy" aliases:nil doesNotHaveVersions:NO], [DHFeed feedWithFeed:@"SVG.xml" icon:@"svg" aliases:@[@"mdn", @"mozilla developer network"] doesNotHaveVersions:YES], - [DHFeed feedWithFeed:@"Swift.xml" icon:@"swift" aliases:@[@"leopard", @"snow leopard", @"lion", @"mountain lion", @"mavericks", @"yosemite", @"10.10", @"10.8", @"10.6", @"mac osx", @"10.7", @"10.9", @"10.5", @"xcode", @"apple", @"cocoa", @"objective-c", @"objc", @"iphone", @"ipad", @"cocoa touch"] doesNotHaveVersions:NO], + [DHFeed feedWithFeed:@"Swift.xml" icon:@"swift" aliases:@[@"leopard", @"snow leopard", @"lion", @"mountain lion", @"mavericks", @"yosemite", @"10.10", @"10.8", @"10.6", @"mac osx", @"10.7", @"10.9", @"10.5", @"xcode", @"apple", @"cocoa", @"objective-c", @"objc", @"iphone", @"ipad", @"cocoa touch"] doesNotHaveVersions:YES], [DHFeed feedWithFeed:@"Symfony.xml" icon:@"symfony" aliases:@[@"php"] doesNotHaveVersions:NO], [DHFeed feedWithFeed:@"Tcl.xml" icon:@"tcl" aliases:@[@"tcl/tk", @"tcltk", @"tcl tk"] doesNotHaveVersions:NO], [DHFeed feedWithFeed:@"Tornado.xml" icon:@"tornado" aliases:@[@"python", @"tornado web server"] doesNotHaveVersions:NO], @@ -236,7 +236,7 @@ - (void)setUp // doesn't get called unless you call the singleton from DHAppDele for(NSDictionary *feedDictionary in savedFeeds) { DHFeed *savedFeed = [DHFeed feedWithDictionaryRepresentation:feedDictionary]; - if([@[@"http://kapeli.com/feeds/OS_X.xml", @"http://kapeli.com/feeds/watchOS.xml", @"http://kapeli.com/feeds/iOS.xml", @"http://kapeli.com/feeds/tvOS.xml", @"http://kapeli.com/feeds/Jade.xml", @"http://kapeli.com/feeds/Angular.dart.xml", @"http://kapeli.com/feeds/AngularJS.xml", @"http://kapeli.com/feeds/AngularTS.xml", @"http://kapeli.com/feeds/Gradle_Groovy_API.xml", @"http://kapeli.com/feeds/XUL.xml"] containsObject:savedFeed.feedURL]) + if([@[@"http://kapeli.com/feeds/OS_X.xml", @"http://kapeli.com/feeds/watchOS.xml", @"http://kapeli.com/feeds/iOS.xml", @"http://kapeli.com/feeds/tvOS.xml", @"http://kapeli.com/feeds/Jade.xml", @"http://kapeli.com/feeds/Angular.dart.xml", @"http://kapeli.com/feeds/Swift.xml", @"http://kapeli.com/feeds/AngularTS.xml", @"http://kapeli.com/feeds/Gradle_Groovy_API.xml", @"http://kapeli.com/feeds/XUL.xml"] containsObject:savedFeed.feedURL]) { if(savedFeed.installed) { @@ -252,7 +252,7 @@ - (void)setUp // doesn't get called unless you call the singleton from DHAppDele savedFeed.installed = NO; savedFeed.installedVersion = nil; } - if([@[@"http://kapeli.com/feeds/OS_X.xml", @"http://kapeli.com/feeds/Jade.xml", @"http://kapeli.com/feeds/Apple_Guides_and_Sample_Code.xml", @"http://kapeli.com/feeds/Angular.dart.xml", @"http://kapeli.com/feeds/AngularJS.xml", @"http://kapeli.com/feeds/AngularTS.xml", @"http://kapeli.com/feeds/Gradle_Groovy_API.xml", @"http://kapeli.com/feeds/XUL.xml"] containsObject:savedFeed.feedURL]) + if([@[@"http://kapeli.com/feeds/OS_X.xml", @"http://kapeli.com/feeds/Jade.xml", @"http://kapeli.com/feeds/Apple_Guides_and_Sample_Code.xml", @"http://kapeli.com/feeds/Angular.dart.xml", @"http://kapeli.com/feeds/AngularTS.xml", @"http://kapeli.com/feeds/Gradle_Groovy_API.xml", @"http://kapeli.com/feeds/XUL.xml"] containsObject:savedFeed.feedURL]) { continue; } @@ -710,6 +710,11 @@ - (BOOL)canInstallFeed:(DHFeed *)feed title = @"Apple API Reference"; message = @"To install the Apple API Reference docset you need to:\n\n1. Use Dash for macOS to install the Apple API Reference docset from Preferences > Downloads\n2. Go to Preferences > Docsets, right click the Apple API Reference docset and select \"Generate iOS Compatible Docset\"\n3. Transfer the resulting docset using iTunes File Sharing"; } + else if([feed.feedURL isEqualToString:@"http://kapeli.com/feeds/Swift.xml"]) + { + title = @"Apple API Reference"; + message = @"There is no Swift docset. The documentation for Swift can be found inside the Apple API Reference docset. Install it instead."; + } else if([@[@"http://kapeli.com/feeds/OS_X.xml", @"http://kapeli.com/feeds/macOS.xml", @"http://kapeli.com/feeds/watchOS.xml", @"http://kapeli.com/feeds/iOS.xml", @"http://kapeli.com/feeds/tvOS.xml"] containsObject:feed.feedURL]) { title = @"Apple API Reference";