diff options
Diffstat (limited to 'platform/ios/app/MBXAppDelegate.m')
-rw-r--r-- | platform/ios/app/MBXAppDelegate.m | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/platform/ios/app/MBXAppDelegate.m b/platform/ios/app/MBXAppDelegate.m index 6abee91557..519c70766a 100644 --- a/platform/ios/app/MBXAppDelegate.m +++ b/platform/ios/app/MBXAppDelegate.m @@ -2,8 +2,6 @@ #import "MBXViewController.h" #import <Mapbox/Mapbox.h> -NSString * const MBXMapboxAccessTokenDefaultsKey = @"MBXMapboxAccessToken"; - @interface MBXAppDelegate() <MGLMetricsManagerDelegate> @end @@ -12,25 +10,11 @@ NSString * const MBXMapboxAccessTokenDefaultsKey = @"MBXMapboxAccessToken"; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - // Set access token, unless MGLAccountManager already read it in from Info.plist. - if ( ! [MGLAccountManager accessToken]) { - NSString *accessToken = [[NSProcessInfo processInfo] environment][@"MAPBOX_ACCESS_TOKEN"]; - if (accessToken) { - // Store to preferences so that we can launch the app later on without having to specify - // token. - [[NSUserDefaults standardUserDefaults] setObject:accessToken forKey:MBXMapboxAccessTokenDefaultsKey]; - } else { - // Try to retrieve from preferences, maybe we've stored them there previously and can reuse - // the token. - accessToken = [[NSUserDefaults standardUserDefaults] objectForKey:MBXMapboxAccessTokenDefaultsKey]; - } - [MGLAccountManager setAccessToken:accessToken]; #ifndef MGL_DISABLE_LOGGING - [MGLLoggingConfiguration sharedConfiguration].loggingLevel = MGLLoggingLevelFault; + [MGLLoggingConfiguration sharedConfiguration].loggingLevel = MGLLoggingLevelFault; #endif - [MGLMetricsManager sharedManager].delegate = self; - } + [MGLMetricsManager sharedManager].delegate = self; return YES; } |