summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorBrad Leege <bleege@gmail.com>2015-05-18 18:15:15 -0500
committerBrad Leege <bleege@gmail.com>2015-05-18 18:15:15 -0500
commitfa34b5396482faa66af0a38d24d724db026d722c (patch)
tree2770b40174454f6868fb4d40e65301b97cbfff68 /platform
parent14c62744c759d2326e757d6977d7380a40d75e6f (diff)
downloadqtlocation-mapboxgl-fa34b5396482faa66af0a38d24d724db026d722c.tar.gz
#1396 - Refactoring Metrics Test Server URL configuration to be drive via Info.plist
Diffstat (limited to 'platform')
-rw-r--r--platform/ios/MGLMapboxEvents.m8
1 files changed, 7 insertions, 1 deletions
diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m
index 5663e3f1c0..98bfe21cfe 100644
--- a/platform/ios/MGLMapboxEvents.m
+++ b/platform/ios/MGLMapboxEvents.m
@@ -14,7 +14,7 @@
#include <sys/sysctl.h>
static NSString *const MGLMapboxEventsUserAgent = @"MapboxEventsiOS/1.0";
-static NSString *const MGLMapboxEventsAPIBase = @"https://api.tiles.mapbox.com";
+static NSString *MGLMapboxEventsAPIBase = @"https://api.tiles.mapbox.com";
NSString *const MGLEventTypeMapLoad = @"map.load";
NSString *const MGLEventTypeMapTap = @"map.click";
@@ -230,6 +230,12 @@ const NSTimeInterval MGLFlushInterval = 60;
// Configure Events Infrastructure
// ===============================
+ // Check for TEST Metrics URL
+ NSString *testURL = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MGLMetricsTestServerURL"];
+ if (testURL != nil) {
+ MGLMapboxEventsAPIBase = testURL;
+ }
+
_paused = YES;
[self resumeMetricsCollection];
NSBundle *resourceBundle = [NSBundle bundleWithPath:[NSBundle mgl_resourceBundlePath]];