summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorBrad Leege <bleege@gmail.com>2015-05-18 21:40:26 -0500
committerBrad Leege <bleege@gmail.com>2015-05-18 21:40:26 -0500
commit5572504d38ddb2cb5e597f9fd256e409ad6dac6d (patch)
tree336a27579df228f84f69dfad6b0bc11496015508 /platform
parent1102f85a8323cf4c06544cd8b741bb82c528e000 (diff)
parentd56daf74800d854be2d21940bc65bab52e36bb2c (diff)
downloadqtlocation-mapboxgl-5572504d38ddb2cb5e597f9fd256e409ad6dac6d.tar.gz
Merge pull request #1589 from mapbox/1396-info-plist-only
Manage Metrics TEST URL 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]];