From fa34b5396482faa66af0a38d24d724db026d722c Mon Sep 17 00:00:00 2001 From: Brad Leege Date: Mon, 18 May 2015 18:15:15 -0500 Subject: [PATCH 1/2] #1396 - Refactoring Metrics Test Server URL configuration to be drive via Info.plist --- ios/app/app-info.plist | 2 ++ platform/ios/MGLMapboxEvents.m | 8 +++++++- test/suite | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ios/app/app-info.plist b/ios/app/app-info.plist index fd03e7324..85afe3e7a 100644 --- a/ios/app/app-info.plist +++ b/ios/app/app-info.plist @@ -47,5 +47,7 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + MGLMetricsTestServerURL + https://cloudfront-staging.tilestream.net diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m index 5663e3f1c..98bfe21cf 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]]; diff --git a/test/suite b/test/suite index d4fb34452..fe4b1ff37 160000 --- a/test/suite +++ b/test/suite @@ -1 +1 @@ -Subproject commit d4fb3445252aa7d0666bf563634d2007cb573c03 +Subproject commit fe4b1ff3717b1b67b82391f004db6c163806d080 From d56daf74800d854be2d21940bc65bab52e36bb2c Mon Sep 17 00:00:00 2001 From: Brad Leege Date: Mon, 18 May 2015 18:26:26 -0500 Subject: [PATCH 2/2] #1396 - Backing out accidental commit from fa34b5396482faa66af0a38d24d724db026d722c --- test/suite | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/suite b/test/suite index fe4b1ff37..d4fb34452 160000 --- a/test/suite +++ b/test/suite @@ -1 +1 @@ -Subproject commit fe4b1ff3717b1b67b82391f004db6c163806d080 +Subproject commit d4fb3445252aa7d0666bf563634d2007cb573c03