diff options
author | Ilya Grechuhin <i.grechuhin@gmail.com> | 2016-11-23 12:25:43 +0300 |
---|---|---|
committer | Ilya Grechuhin <i.grechuhin@gmail.com> | 2016-11-23 12:25:43 +0300 |
commit | db9dafeda29fecbfd4e38106965ab08d65e249f6 (patch) | |
tree | 8f334e7b0de69ecd7a46669146dc10c6da970ea3 | |
parent | 9b92aeb06e90780d9d7354ee33acce4166b46444 (diff) |
[settings] [ios] Added build number display to MWMAboutController.
-rw-r--r-- | iphone/Maps/MWMAboutController.mm | 5 | ||||
-rw-r--r-- | iphone/Maps/Statistics/AppInfo.h | 1 | ||||
-rw-r--r-- | iphone/Maps/Statistics/AppInfo.mm | 10 |
3 files changed, 13 insertions, 3 deletions
diff --git a/iphone/Maps/MWMAboutController.mm b/iphone/Maps/MWMAboutController.mm index e195c9424c..7e59925d11 100644 --- a/iphone/Maps/MWMAboutController.mm +++ b/iphone/Maps/MWMAboutController.mm @@ -41,8 +41,9 @@ extern NSString * const kAlohalyticsTapEventKey; self.tableView.tableHeaderView = self.headerView; AppInfo * appInfo = [AppInfo sharedInfo]; - - self.versionLabel.text = [NSString stringWithFormat:L(@"version"), appInfo.bundleVersion]; + NSString * version = + [NSString stringWithFormat:@"%@.%@", appInfo.bundleVersion, appInfo.buildNumber]; + self.versionLabel.text = [NSString stringWithFormat:L(@"version"), version]; NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init]; dateFormatter.dateStyle = NSDateFormatterShortStyle; diff --git a/iphone/Maps/Statistics/AppInfo.h b/iphone/Maps/Statistics/AppInfo.h index 69e2fd344b..378827a82d 100644 --- a/iphone/Maps/Statistics/AppInfo.h +++ b/iphone/Maps/Statistics/AppInfo.h @@ -8,6 +8,7 @@ @property(nonatomic, readonly) NSString * countryCode; @property(nonatomic, readonly) NSString * uniqueId; @property(nonatomic, readonly) NSString * bundleVersion; +@property(nonatomic, readonly) NSString * buildNumber; @property(nonatomic, readonly) NSUUID * advertisingId; @property(nonatomic, readonly) NSString * languageId; @property(nonatomic, readonly) NSDate * buildDate; diff --git a/iphone/Maps/Statistics/AppInfo.mm b/iphone/Maps/Statistics/AppInfo.mm index 8c4d44da18..9a8937307a 100644 --- a/iphone/Maps/Statistics/AppInfo.mm +++ b/iphone/Maps/Statistics/AppInfo.mm @@ -15,6 +15,7 @@ extern string const kLanguageKey = "Language"; @property(nonatomic) NSString * countryCode; @property(nonatomic) NSString * uniqueId; @property(nonatomic) NSString * bundleVersion; +@property(nonatomic) NSString * buildNumber; @property(nonatomic) NSString * deviceInfo; @property(nonatomic) NSUUID * advertisingId; @property(nonatomic) NSDate * buildDate; @@ -96,10 +97,17 @@ extern string const kLanguageKey = "Language"; - (NSString *)bundleVersion { if (!_bundleVersion) - _bundleVersion = [[NSBundle mainBundle] infoDictionary][@"CFBundleVersion"]; + _bundleVersion = [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"]; return _bundleVersion; } +- (NSString *)buildNumber +{ + if (!_buildNumber) + _buildNumber = [[NSBundle mainBundle] infoDictionary][@"CFBundleVersion"]; + return _buildNumber; +} + - (NSUUID *)advertisingId { if (!_advertisingId) |