summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2016-04-12 19:53:32 -0400
committerJason Wray <jason@mapbox.com>2016-04-13 18:04:06 -0400
commit7e0a2e36e60d9def45f396b8dc9ee109c24013ba (patch)
treed8fe4f7cd86c11923572b692314e4a65b7ebe5b3
parentef65d2015c60d206cc72571c80d6ab05d9dd24c2 (diff)
downloadqtlocation-mapboxgl-7e0a2e36e60d9def45f396b8dc9ee109c24013ba.tar.gz
[ios] Convert telemetry test server setting to user default
- Previously looked in app's Info.plist, now looks at NSUserDefaults
-rw-r--r--platform/ios/app/MBXViewController.m3
-rw-r--r--platform/ios/app/app-info.plist6
-rw-r--r--platform/ios/src/MGLAPIClient.m2
3 files changed, 4 insertions, 7 deletions
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m
index 2102ff2705..45d27a14df 100644
--- a/platform/ios/app/MBXViewController.m
+++ b/platform/ios/app/MBXViewController.m
@@ -40,9 +40,8 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
@"MBXUserTrackingMode": @(MGLUserTrackingModeNone),
@"MBXShowsUserLocation": @NO,
@"MBXDebug": @NO,
+ @"MGLTelemetryTestServerURL": @"https://cloudfront-staging.tilestream.net",
}];
-
-
}
}
diff --git a/platform/ios/app/app-info.plist b/platform/ios/app/app-info.plist
index 13452c9427..3bece7118f 100644
--- a/platform/ios/app/app-info.plist
+++ b/platform/ios/app/app-info.plist
@@ -24,8 +24,6 @@
<string>7877</string>
<key>LSRequiresIPhoneOS</key>
<true/>
- <key>MGLMetricsTestServerURL</key>
- <string>https://cloudfront-staging.tilestream.net</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
@@ -40,9 +38,9 @@
<key>NSHumanReadableCopyright</key>
<string>© 2014–2016 Mapbox</string>
<key>NSLocationAlwaysUsageDescription</key>
- <string>The map will ALWAYS display the user's location.</string>
+ <string>The map will ALWAYS display the user’s location.</string>
<key>NSLocationWhenInUseUsageDescription</key>
- <string>The map will display the user's location.</string>
+ <string>The map will display the user’s location.</string>
<key>UILaunchStoryboardName</key>
<string>Default</string>
<key>UIMainStoryboardFile</key>
diff --git a/platform/ios/src/MGLAPIClient.m b/platform/ios/src/MGLAPIClient.m
index 91bc074425..5ce8b40f1a 100644
--- a/platform/ios/src/MGLAPIClient.m
+++ b/platform/ios/src/MGLAPIClient.m
@@ -87,7 +87,7 @@ static NSString * const MGLAPIClientHTTPMethodPost = @"POST";
}
- (void)setupBaseURL {
- NSString *testServerURL = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MGLMetricsTestServerURL"];
+ NSString *testServerURL = [[NSUserDefaults standardUserDefaults] stringForKey:@"MGLTelemetryTestServerURL"];
if (testServerURL) {
_baseURL = testServerURL;
_usesTestServer = YES;