From fa34b5396482faa66af0a38d24d724db026d722c Mon Sep 17 00:00:00 2001 From: Brad Leege Date: Mon, 18 May 2015 18:15:15 -0500 Subject: #1396 - Refactoring Metrics Test Server URL configuration to be drive via Info.plist --- platform/ios/MGLMapboxEvents.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'platform') 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 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]]; -- cgit v1.2.1