Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed Xcode quick help. Fixes #217.

Turns out recent change to better support Dash broke Xcode quick help - Xcode does rely on `DocSetPlatformFamily` info plist key, must be either empty string or one of the valid platforms. To compensate and still support Dash, a custom key was introduced - `DashDocSetFamily`, if its value is `appledoc`, Dash will use optimized rendering.
  • Loading branch information...
commit f53b1aa677c076b5f707ca0af5f36d00742d4d7e 1 parent 308c923
@tomaz authored
View
3  Application/GBAppledocApplication.m
@@ -74,6 +74,7 @@
static NSString *kGBArgDocSetPublisherIdentifier = @"docset-publisher-id";
static NSString *kGBArgDocSetPublisherName = @"docset-publisher-name";
static NSString *kGBArgDocSetMinimumXcodeVersion = @"docset-min-xcode-version";
+static NSString *kGBArgDashPlatformFamily = @"dash-platform-family";
static NSString *kGBArgDocSetPlatformFamily = @"docset-platform-family";
static NSString *kGBArgDocSetCertificateIssuer = @"docset-cert-issuer";
static NSString *kGBArgDocSetCertificateSigner = @"docset-cert-signer";
@@ -250,6 +251,7 @@ - (void)application:(DDCliApplication *)app willParseOptions:(DDGetoptLongParser
{ kGBArgDocSetPublisherIdentifier, 0, DDGetoptRequiredArgument },
{ kGBArgDocSetPublisherName, 0, DDGetoptRequiredArgument },
{ kGBArgDocSetCopyrightMessage, 0, DDGetoptRequiredArgument },
+ { kGBArgDashPlatformFamily, 0, DDGetoptRequiredArgument },
{ kGBArgDocSetBundleFilename, 0, DDGetoptRequiredArgument },
{ kGBArgDocSetAtomFilename, 0, DDGetoptRequiredArgument },
@@ -728,6 +730,7 @@ - (void)setDocsetMinXcodeVersion:(NSString *)value { self.settings.docsetMinimum
- (void)setDocsetPlatformFamily:(NSString *)value { self.settings.docsetPlatformFamily = value; }
- (void)setDocsetCertIssuer:(NSString *)value { self.settings.docsetCertificateIssuer = value; }
- (void)setDocsetCertSigner:(NSString *)value { self.settings.docsetCertificateSigner = value; }
+- (void)setDashPlatformFamily:(NSString *)value { self.settings.dashDocsetPlatformFamily = value; }
- (void)setDocsetBundleFilename:(NSString *)value { self.settings.docsetBundleFilename = value; }
- (void)setDocsetAtomFilename:(NSString *)value { self.settings.docsetAtomFilename = value; }
View
3  Application/GBApplicationSettingsProvider.h
@@ -101,6 +101,9 @@ extern id kGBCustomDocumentIndexDescKey;
/** Documentation set minimum Xcode version. */
@property (copy) NSString *docsetMinimumXcodeVersion;
+/** Documentation set platform family for using within Dash. */
+@property (copy) NSString *dashDocsetPlatformFamily;
+
/** Documentation set platform family. */
@property (copy) NSString *docsetPlatformFamily;
View
4 Application/GBApplicationSettingsProvider.m
@@ -123,7 +123,8 @@ - (id)init {
self.docsetFeedURL = @"";
self.docsetPackageURL = @"";
self.docsetMinimumXcodeVersion = @"3.0";
- self.docsetPlatformFamily = @"appledoc"; // this makes docset TOC usable from within Dash - http://kapeli.com/dash/
+ self.dashDocsetPlatformFamily = @"appledoc"; // this makes docset TOC usable from within Dash - http://kapeli.com/dash/
+ self.docsetPlatformFamily = @"";
self.docsetPublisherIdentifier = [NSString stringWithFormat:@"%@.documentation", kGBTemplatePlaceholderCompanyID];
self.docsetPublisherName = [NSString stringWithFormat:@"%@", kGBTemplatePlaceholderCompany];
self.docsetCopyrightMessage = [NSString stringWithFormat:@"Copyright © %@ %@. All rights reserved.", kGBTemplatePlaceholderYear, kGBTemplatePlaceholderCompany];
@@ -591,6 +592,7 @@ - (NSString *)versionIdentifier {
@synthesize docsetFeedURL;
@synthesize docsetPackageURL;
@synthesize docsetMinimumXcodeVersion;
+@synthesize dashDocsetPlatformFamily;
@synthesize docsetPlatformFamily;
@synthesize docsetPublisherIdentifier;
@synthesize docsetPublisherName;
View
1  Generating/GBDocSetOutputGenerator.m
@@ -109,6 +109,7 @@ - (BOOL)processInfoPlist:(NSError **)error {
addVarUnlessEmpty(self.settings.docsetPublisherIdentifier, @"publisherIdentifier");
addVarUnlessEmpty(self.settings.docsetPublisherName, @"publisherName");
addVarUnlessEmpty(self.settings.docsetCopyrightMessage, @"copyrightMessage");
+ addVarUnlessEmpty(self.settings.dashDocsetPlatformFamily, @"dashPlatformFamily");
// Run the template and save the results as Info.plist.
GBTemplateHandler *handler = [self.templateFiles objectForKey:templatePath];
View
2  Templates/docset/Contents/info-template.plist
@@ -28,6 +28,8 @@
<string>{{minimumXcodeVersion}}</string>{{/minimumXcodeVersion}}
{{#platformFamily}}<key>DocSetPlatformFamily</key>
<string>{{platformFamily}}</string>{{/platformFamily}}
+ {{#dashPlatformFamily}}<key>DashDocSetFamily</key>
+ <string>{{dashPlatformFamily}}</string>{{/dashPlatformFamily}}
{{#publisherIdentifier}}<key>DocSetPublisherIdentifier</key>
<string>{{publisherIdentifier}}</string>{{/publisherIdentifier}}
{{#publisherName}}<key>DocSetPublisherName</key>
Please sign in to comment.
Something went wrong with that request. Please try again.