[ios] Convert telemetry test server setting to user default
- Previously looked in app's Info.plist, now looks at NSUserDefaults
This commit is contained in:
@@ -40,9 +40,8 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
|
||||
@"MBXUserTrackingMode": @(MGLUserTrackingModeNone),
|
||||
@"MBXShowsUserLocation": @NO,
|
||||
@"MBXDebug": @NO,
|
||||
@"MGLTelemetryTestServerURL": @"https://cloudfront-staging.tilestream.net",
|
||||
}];
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user