diff options
author | Nadia Barbosa <nadiabarbosa@me.com> | 2019-04-29 17:19:38 -0700 |
---|---|---|
committer | Nadia Barbosa <captainbarbosa@users.noreply.github.com> | 2019-05-01 18:30:46 -0700 |
commit | 3e4afbc788424ef4d89d48f4d29204d1593f769d (patch) | |
tree | eec17784d7f5fcad6bc83fc8ffc4ce871a81f0cc /platform/ios/benchmark/MBXBenchViewController.mm | |
parent | 8b91a4a037ab84cafd40b62da0224e3baf100168 (diff) | |
download | qtlocation-mapboxgl-3e4afbc788424ef4d89d48f4d29204d1593f769d.tar.gz |
[iosapp] Move token setting to build script
[ios] Switch to script-based token insertion for benchmarking app
[ios] Update Developing.md
[iosapp, benchmark app] Look for token file outside of version-controlled directory
[iosapp, benchmark app] Remove remaining code for access token checking from app delegates
Feedback edits for @friedbunny
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; |