diff options
Diffstat (limited to 'platform/ios/benchmark/MBXBenchViewController.mm')
-rw-r--r-- | platform/ios/benchmark/MBXBenchViewController.mm | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/platform/ios/benchmark/MBXBenchViewController.mm b/platform/ios/benchmark/MBXBenchViewController.mm index 84c2790d50..21e9ce2d98 100644 --- a/platform/ios/benchmark/MBXBenchViewController.mm +++ b/platform/ios/benchmark/MBXBenchViewController.mm @@ -53,33 +53,7 @@ { [super viewDidAppear:animated]; - if ([MGLAccountManager accessToken].length) { - [self startBenchmarkIteration]; - } else { - UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Access Token" message:@"Enter your Mapbox access token to load Mapbox-hosted tiles and styles:" preferredStyle:UIAlertControllerStyleAlert]; - [alertController addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) { - textField.keyboardType = UIKeyboardTypeURL; - textField.autocorrectionType = UITextAutocorrectionTypeNo; - textField.autocapitalizationType = UITextAutocapitalizationTypeNone; - }]; - - [alertController addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { - [self startBenchmarkIteration]; - }]]; - UIAlertAction *OKAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { - UITextField *textField = alertController.textFields.firstObject; - NSString *accessToken = textField.text; - [[NSUserDefaults standardUserDefaults] setObject:accessToken forKey:MBXMapboxAccessTokenDefaultsKey]; - [MGLAccountManager setAccessToken:accessToken]; - [self.mapView reloadStyle:self]; - - [self startBenchmarkIteration]; - }]; - [alertController addAction:OKAction]; - alertController.preferredAction = OKAction; - - [self presentViewController:alertController animated:YES completion:nil]; - } + [self startBenchmarkIteration]; } size_t idx = 0; |