From 358666b6ac2a94bbf0d8bdbb58de86f5d7c489d0 Mon Sep 17 00:00:00 2001 From: Viktor Govako Date: Mon, 28 Oct 2024 16:08:21 -0300 Subject: [PATCH] [iOS] Revert Platform::Version. Signed-off-by: Viktor Govako --- iphone/Maps/main.mm | 6 +++++- platform/platform_ios.mm | 5 ++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/iphone/Maps/main.mm b/iphone/Maps/main.mm index 55df103325..98261accb4 100644 --- a/iphone/Maps/main.mm +++ b/iphone/Maps/main.mm @@ -6,8 +6,12 @@ int main(int argc, char * argv[]) { [MWMSettings initializeLogging]; + + NSBundle * mainBundle = [NSBundle mainBundle]; + NSString * appName = [mainBundle objectForInfoDictionaryKey:@"CFBundleName"]; + NSString * bundleId = mainBundle.bundleIdentifier; auto & p = GetPlatform(); - LOG(LINFO, (p.Version(), "started, detected CPU cores:", p.CpuCores())); + LOG(LINFO, (appName.UTF8String, bundleId.UTF8String, p.Version(), "started, detected CPU cores:", p.CpuCores())); int retVal; @autoreleasepool diff --git a/platform/platform_ios.mm b/platform/platform_ios.mm index b83b37db01..5293673cdd 100644 --- a/platform/platform_ios.mm +++ b/platform/platform_ios.mm @@ -162,12 +162,11 @@ std::string Platform::DeviceModel() const std::string Platform::Version() const { + /// @note Do not change version format, it is parsed on server side. NSBundle * mainBundle = [NSBundle mainBundle]; - NSString * appName = [mainBundle objectForInfoDictionaryKey:@"CFBundleName"]; - NSString * bundleId = mainBundle.bundleIdentifier; NSString * version = [mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; NSString * build = [mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]; - return std::string{appName.UTF8String} + ' ' + std::string{bundleId.UTF8String} + ' ' + std::string{version.UTF8String} + '-' + build.UTF8String + '-' + OMIM_OS_NAME; + return std::string{version.UTF8String} + '-' + build.UTF8String + '-' + OMIM_OS_NAME; } int32_t Platform::IntVersion() const