From 1d395e72bd98a31d40c68abbfdefafc23919a61c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Thu, 21 Jan 2016 16:04:27 -0800 Subject: [PATCH] [ios] Derive Fabric versioning from Info.plist Avoid hard-coding the bundle identifier and version string. --- platform/ios/src/MGLAccountManager.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/ios/src/MGLAccountManager.m b/platform/ios/src/MGLAccountManager.m index 9b60a4098..764f9f097 100644 --- a/platform/ios/src/MGLAccountManager.m +++ b/platform/ios/src/MGLAccountManager.m @@ -1,5 +1,6 @@ #import "MGLAccountManager_Private.h" #import "MGLMapboxEvents.h" +#import "NSBundle+MGLAdditions.h" #import "NSProcessInfo+MGLAdditions.h" #import "FABKitProtocol.h" @@ -70,11 +71,11 @@ #pragma mark - Fabric + (NSString *)bundleIdentifier { - return @"com.mapbox.sdk.ios"; + return [NSBundle mgl_frameworkBundle].bundleIdentifier; } + (NSString *)kitDisplayVersion { - return @"3.0.1"; + return [NSBundle mgl_frameworkBundle].infoDictionary[@"CFBundleShortVersionString"]; } + (void)initializeIfNeeded {