Skip to content

Commit

Permalink
fixed version string
Browse files Browse the repository at this point in the history
  • Loading branch information
matryer committed Dec 9, 2020
1 parent d501dfd commit a262036
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion App/BitBar/PluginManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ - (void) addHelperItemsToMenu:(NSMenu*)menu asSubMenu:(BOOL)submenu {

[targetMenu addItem:NSMenuItem.separatorItem];

NSString *versionString = [NSBundle.mainBundle.infoDictionary objectForKey:@"CFBundleShortVersionString"];
NSString *versionString = nil;
versionString = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
if (!versionString) {
versionString = [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey];
}

NSMenuItem *versionMenuitem = [[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@"v%@", versionString] action:nil keyEquivalent:@""];

Expand Down

0 comments on commit a262036

Please sign in to comment.