summaryrefslogtreecommitdiff
path: root/platform/ios/benchmark/MBXBenchAppDelegate.m
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios/benchmark/MBXBenchAppDelegate.m')
-rw-r--r--platform/ios/benchmark/MBXBenchAppDelegate.m15
1 files changed, 0 insertions, 15 deletions
diff --git a/platform/ios/benchmark/MBXBenchAppDelegate.m b/platform/ios/benchmark/MBXBenchAppDelegate.m
index 684c90d336..522ebb2dbc 100644
--- a/platform/ios/benchmark/MBXBenchAppDelegate.m
+++ b/platform/ios/benchmark/MBXBenchAppDelegate.m
@@ -2,25 +2,10 @@
#import "MBXBenchViewController.h"
#import <Mapbox/Mapbox.h>
-NSString * const MBXMapboxAccessTokenDefaultsKey = @"MBXMapboxAccessToken";
-
@implementation MBXBenchAppDelegate
- (BOOL)application:(UIApplication*)application
didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
- 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];
- }
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.rootViewController = [MBXBenchViewController new];