summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Guerra <fabian.guerra@mapbox.com>2019-03-05 13:29:21 -0800
committerFabian Guerra <fabian.guerra@mapbox.com>2019-03-28 15:05:26 -0700
commita2f0ce505b6f714f130746be7cb9409667174cbc (patch)
treef868f8f95af363846b032038350e79449b329550
parentb91b441ac99802ac29d21da22132b9edfc4fa17e (diff)
downloadqtlocation-mapboxgl-a2f0ce505b6f714f130746be7cb9409667174cbc.tar.gz
[ios, macos] Rename MGLEventsManager to MGLMetricsManager.
-rw-r--r--platform/darwin/src/MGLEventsManager.h22
-rw-r--r--platform/darwin/src/MGLEventsManager.m27
-rw-r--r--platform/darwin/src/MGLEventsManager_Private.h11
-rw-r--r--platform/darwin/src/MGLMetricsManager.h32
-rw-r--r--platform/darwin/src/MGLMetricsManager.m45
-rw-r--r--platform/darwin/src/MGLMetricsManager_Private.h13
-rw-r--r--platform/darwin/src/MGLNetworkConfiguration.m6
-rw-r--r--platform/ios/app/MBXAppDelegate.m13
-rw-r--r--platform/ios/ios.xcodeproj/project.pbxproj36
-rw-r--r--platform/ios/sdk-files.json7
-rw-r--r--platform/ios/src/Mapbox.h2
-rw-r--r--platform/macos/macos.xcodeproj/project.pbxproj24
-rw-r--r--platform/macos/sdk-files.json7
-rw-r--r--platform/macos/src/Mapbox.h2
14 files changed, 144 insertions, 103 deletions
diff --git a/platform/darwin/src/MGLEventsManager.h b/platform/darwin/src/MGLEventsManager.h
deleted file mode 100644
index a8d92ebd77..0000000000
--- a/platform/darwin/src/MGLEventsManager.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#import <Foundation/Foundation.h>
-#import "MGLFoundation.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-typedef void (^MGLEventHandler)(NSString *eventName, NSDictionary *attributes);
-
-MGL_EXPORT
-@interface MGLEventsManager : NSObject
-
-/**
- Returns the shared logging object.
- */
-@property (class, nonatomic, readonly) MGLEventsManager *sharedManager;
-
-@property (nonatomic, copy, nullable) MGLEventHandler handler;
-
-@property (nonatomic, assign) BOOL shouldHandleEvents;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/platform/darwin/src/MGLEventsManager.m b/platform/darwin/src/MGLEventsManager.m
deleted file mode 100644
index 3790f55c26..0000000000
--- a/platform/darwin/src/MGLEventsManager.m
+++ /dev/null
@@ -1,27 +0,0 @@
-#import "MGLEventsManager_Private.h"
-#if TARGET_OS_IOS
-#import "MGLMapboxEvents.h"
-#endif
-
-@implementation MGLEventsManager
-
-+ (instancetype)sharedManager
-{
- static dispatch_once_t once;
- static id sharedConfiguration;
- dispatch_once(&once, ^{
- sharedConfiguration = [[self alloc] init];
- });
- return sharedConfiguration;
-}
-
-- (void)handleEvent:(NSString *)eventName withAttributes:(NSDictionary *)attributes {
-#if TARGET_OS_IOS
- [MGLMapboxEvents pushEvent:eventName withAttributes:attributes];
-#endif
- if (self.shouldHandleEvents && self.handler) {
- self.handler(eventName, attributes);
- }
-}
-
-@end
diff --git a/platform/darwin/src/MGLEventsManager_Private.h b/platform/darwin/src/MGLEventsManager_Private.h
deleted file mode 100644
index f51768ecb1..0000000000
--- a/platform/darwin/src/MGLEventsManager_Private.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#import "MGLEventsManager.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface MGLEventsManager (Private)
-
-- (void)handleEvent:(NSString *)eventName withAttributes:(NSDictionary *)attributes;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/platform/darwin/src/MGLMetricsManager.h b/platform/darwin/src/MGLMetricsManager.h
new file mode 100644
index 0000000000..73756cebed
--- /dev/null
+++ b/platform/darwin/src/MGLMetricsManager.h
@@ -0,0 +1,32 @@
+#import <Foundation/Foundation.h>
+#import "MGLFoundation.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef NS_ENUM(NSUInteger, MGLMetricType) {
+ MGLMetricTypePerformance = 0,
+};
+
+@protocol MGLMetricsDelegate <NSObject>
+
+- (BOOL)shouldHandleMetric:(MGLMetricType)metricType;
+- (void)didCollectMetric:(MGLMetricType)metricType withAttributes:(NSDictionary *)attributes;
+
+@end
+
+typedef void (^MGLEventHandler)(NSString *eventName, NSDictionary *attributes);
+
+MGL_EXPORT
+@interface MGLMetricsManager : NSObject
+
+@property (class, nonatomic, readonly) MGLMetricsManager *sharedManager;
+
+@property (nonatomic, weak) id<MGLMetricsDelegate> delegate;
+
+#if TARGET_OS_IOS
+- (void)pushMetric:(MGLMetricType)metricType withAttributes:(NSDictionary *)attributes;
+#endif
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/platform/darwin/src/MGLMetricsManager.m b/platform/darwin/src/MGLMetricsManager.m
new file mode 100644
index 0000000000..75dc593aa7
--- /dev/null
+++ b/platform/darwin/src/MGLMetricsManager.m
@@ -0,0 +1,45 @@
+#import "MGLMetricsManager_Private.h"
+#if TARGET_OS_IOS
+#import "MGLMapboxEvents.h"
+#endif
+
+NSString * const kMGLPerformanceMetric = @"mobile.performance_trace";
+
+@implementation MGLMetricsManager
+
++ (instancetype)sharedManager
+{
+ static dispatch_once_t once;
+ static id sharedConfiguration;
+ dispatch_once(&once, ^{
+ sharedConfiguration = [[self alloc] init];
+ });
+ return sharedConfiguration;
+}
+
+- (void)handleMetricEvent:(MGLMetricType)metricType withAttributes:(NSDictionary *)attributes {
+ if ([self.delegate shouldHandleMetric:metricType]) {
+ [self.delegate didCollectMetric:metricType withAttributes:attributes];
+ }
+}
+
+#if TARGET_OS_IOS
+- (void)pushMetric:(MGLMetricType)metricType withAttributes:(NSDictionary *)attributes {
+
+ NSString *eventName;
+
+ switch (metricType) {
+ case MGLMetricTypePerformance:
+ eventName = kMGLPerformanceMetric;
+ break;
+
+ default:
+ break;
+ }
+
+ [MGLMapboxEvents pushEvent:eventName withAttributes:attributes];
+
+}
+#endif
+
+@end
diff --git a/platform/darwin/src/MGLMetricsManager_Private.h b/platform/darwin/src/MGLMetricsManager_Private.h
new file mode 100644
index 0000000000..4a32710925
--- /dev/null
+++ b/platform/darwin/src/MGLMetricsManager_Private.h
@@ -0,0 +1,13 @@
+#import "MGLMetricsManager.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+extern NSString *const kMGLPerformanceMetric;
+
+@interface MGLMetricsManager (Private)
+
+- (void)handleMetricEvent:(MGLMetricType)metricType withAttributes:(NSDictionary *)attributes;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/platform/darwin/src/MGLNetworkConfiguration.m b/platform/darwin/src/MGLNetworkConfiguration.m
index 5a62a7497b..5682e0bc1e 100644
--- a/platform/darwin/src/MGLNetworkConfiguration.m
+++ b/platform/darwin/src/MGLNetworkConfiguration.m
@@ -1,5 +1,5 @@
#import "MGLNetworkConfiguration_Private.h"
-#import "MGLEventsManager_Private.h"
+#import "MGLMetricsManager_Private.h"
NSString * const kMGLDownloadPerformanceEvent = @"mobile.performance_trace";
static NSString * const MGLStartTime = @"start_time";
@@ -73,7 +73,7 @@ static NSString * const MGLResourceType = @"resource_type";
{
if (urlString && [self.events objectForKey:urlString]) {
NSDictionary *eventAttributes = [self eventAttributesForURL:urlString withAction:action];
- [[MGLEventsManager sharedManager] handleEvent:kMGLDownloadPerformanceEvent withAttributes:eventAttributes];
+ [[MGLMetricsManager sharedManager] handleMetricEvent:MGLMetricTypePerformance withAttributes:eventAttributes];
[self.events removeObjectForKey:urlString];
}
}
@@ -96,7 +96,7 @@ static NSString * const MGLResourceType = @"resource_type";
}
return @{
- @"event" : kMGLDownloadPerformanceEvent,
+ @"event" : kMGLPerformanceMetric,
@"created" : createdDate,
@"sessionId" : [NSUUID UUID].UUIDString,
@"counters" : @[ @{ @"name" : @"elapsed_time" , @"value" : @(elapsedTime) } ],
diff --git a/platform/ios/app/MBXAppDelegate.m b/platform/ios/app/MBXAppDelegate.m
index 9932356e6e..a49a1651e2 100644
--- a/platform/ios/app/MBXAppDelegate.m
+++ b/platform/ios/app/MBXAppDelegate.m
@@ -4,6 +4,10 @@
NSString * const MBXMapboxAccessTokenDefaultsKey = @"MBXMapboxAccessToken";
+@interface MBXAppDelegate() <MGLMetricsDelegate>
+
+@end
+
@implementation MBXAppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
@@ -24,6 +28,7 @@ NSString * const MBXMapboxAccessTokenDefaultsKey = @"MBXMapboxAccessToken";
#ifndef MGL_DISABLE_LOGGING
[MGLLoggingConfiguration sharedConfiguration].loggingLevel = MGLLoggingLevelFault;
#endif
+ [MGLMetricsManager sharedManager].delegate = self;
}
return YES;
@@ -47,4 +52,12 @@ NSString * const MBXMapboxAccessTokenDefaultsKey = @"MBXMapboxAccessToken";
return NO;
}
+- (BOOL)shouldHandleMetric:(MGLMetricType)metricType {
+ return YES;
+}
+
+- (void)didCollectMetric:(MGLMetricType)metricType withAttributes:(NSDictionary *)attributes {
+ [[MGLMetricsManager sharedManager] pushMetric:metricType withAttributes:attributes];
+}
+
@end
diff --git a/platform/ios/ios.xcodeproj/project.pbxproj b/platform/ios/ios.xcodeproj/project.pbxproj
index 75a2d419c7..182273c78e 100644
--- a/platform/ios/ios.xcodeproj/project.pbxproj
+++ b/platform/ios/ios.xcodeproj/project.pbxproj
@@ -62,13 +62,13 @@
1FF48587223710BE00F19727 /* MGLAttributedExpression.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FF48585223710BE00F19727 /* MGLAttributedExpression.h */; settings = {ATTRIBUTES = (Public, ); }; };
1FF48588223710BE00F19727 /* MGLAttributedExpression.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FF48585223710BE00F19727 /* MGLAttributedExpression.h */; settings = {ATTRIBUTES = (Public, ); }; };
1FF48589223710BE00F19727 /* MGLAttributedExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FF48586223710BE00F19727 /* MGLAttributedExpression.m */; };
- 1FCCEC34222605C400302E3B /* MGLEventsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCCEC32222605C400302E3B /* MGLEventsManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 1FCCEC35222605C400302E3B /* MGLEventsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCCEC32222605C400302E3B /* MGLEventsManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 1FCCEC36222605C400302E3B /* MGLEventsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCCEC33222605C400302E3B /* MGLEventsManager.m */; };
- 1FCCEC37222605C400302E3B /* MGLEventsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCCEC33222605C400302E3B /* MGLEventsManager.m */; };
- 1FCCEC3A222607A500302E3B /* MGLEventsManager_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCCEC38222607A500302E3B /* MGLEventsManager_Private.h */; };
+ 1FCCEC34222605C400302E3B /* MGLMetricsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCCEC32222605C400302E3B /* MGLMetricsManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1FCCEC35222605C400302E3B /* MGLMetricsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCCEC32222605C400302E3B /* MGLMetricsManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1FCCEC36222605C400302E3B /* MGLMetricsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCCEC33222605C400302E3B /* MGLMetricsManager.m */; };
+ 1FCCEC37222605C400302E3B /* MGLMetricsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCCEC33222605C400302E3B /* MGLMetricsManager.m */; };
+ 1FCCEC3A222607A500302E3B /* MGLMetricsManager_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCCEC38222607A500302E3B /* MGLMetricsManager_Private.h */; };
1FF4858A223710BE00F19727 /* MGLAttributedExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FF48586223710BE00F19727 /* MGLAttributedExpression.m */; };
- 1FCCEC3B222607A500302E3B /* MGLEventsManager_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCCEC38222607A500302E3B /* MGLEventsManager_Private.h */; };
+ 1FCCEC3B222607A500302E3B /* MGLMetricsManager_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCCEC38222607A500302E3B /* MGLMetricsManager_Private.h */; };
30E578171DAA85520050F07E /* UIImage+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E578111DAA7D690050F07E /* UIImage+MGLAdditions.h */; };
30E578181DAA85520050F07E /* UIImage+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E578111DAA7D690050F07E /* UIImage+MGLAdditions.h */; };
30E578191DAA855E0050F07E /* UIImage+MGLAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 30E578121DAA7D690050F07E /* UIImage+MGLAdditions.mm */; };
@@ -890,9 +890,9 @@
1FCAE2A020B872A400C577DD /* MGLLocationManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLLocationManager.h; sourceTree = "<group>"; };
1FCAE2A120B872A400C577DD /* MGLLocationManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGLLocationManager.m; sourceTree = "<group>"; };
1FCAE2A620B88B3800C577DD /* MGLLocationManager_Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLLocationManager_Private.h; sourceTree = "<group>"; };
- 1FCCEC32222605C400302E3B /* MGLEventsManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLEventsManager.h; sourceTree = "<group>"; };
- 1FCCEC33222605C400302E3B /* MGLEventsManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGLEventsManager.m; sourceTree = "<group>"; };
- 1FCCEC38222607A500302E3B /* MGLEventsManager_Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLEventsManager_Private.h; sourceTree = "<group>"; };
+ 1FCCEC32222605C400302E3B /* MGLMetricsManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLMetricsManager.h; sourceTree = "<group>"; };
+ 1FCCEC33222605C400302E3B /* MGLMetricsManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGLMetricsManager.m; sourceTree = "<group>"; };
+ 1FCCEC38222607A500302E3B /* MGLMetricsManager_Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLMetricsManager_Private.h; sourceTree = "<group>"; };
1FDB00C721F8F14E00D21389 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = "<group>"; };
1FDB00C821F8F14F00D21389 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Foundation.strings; sourceTree = "<group>"; };
1FDB00C921F8F15000D21389 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = cs; path = cs.lproj/Foundation.stringsdict; sourceTree = "<group>"; };
@@ -2095,11 +2095,11 @@
DA00FC8C1D5EEB0D009AABC8 /* MGLAttributionInfo.h */,
DAF0D8171DFE6B2800B28378 /* MGLAttributionInfo_Private.h */,
DA00FC8D1D5EEB0D009AABC8 /* MGLAttributionInfo.mm */,
- 1FCCEC32222605C400302E3B /* MGLEventsManager.h */,
+ 1FCCEC32222605C400302E3B /* MGLMetricsManager.h */,
1FF48585223710BE00F19727 /* MGLAttributedExpression.h */,
1FF48586223710BE00F19727 /* MGLAttributedExpression.m */,
- 1FCCEC38222607A500302E3B /* MGLEventsManager_Private.h */,
- 1FCCEC33222605C400302E3B /* MGLEventsManager.m */,
+ 1FCCEC38222607A500302E3B /* MGLMetricsManager_Private.h */,
+ 1FCCEC33222605C400302E3B /* MGLMetricsManager.m */,
556660C91E1BF3A900E2C41B /* MGLFoundation.h */,
558DE79E1E5615E400C7916D /* MGLFoundation_Private.h */,
558DE79F1E5615E400C7916D /* MGLFoundation.mm */,
@@ -2432,7 +2432,7 @@
3510FFF01D6D9D8C00F413B2 /* NSExpression+MGLAdditions.h in Headers */,
74CB5EBF219B280400102936 /* MGLHeatmapStyleLayer_Private.h in Headers */,
1FC4817D2098CBC0000D09B4 /* NSPredicate+MGLPrivateAdditions.h in Headers */,
- 1FCCEC3A222607A500302E3B /* MGLEventsManager_Private.h in Headers */,
+ 1FCCEC3A222607A500302E3B /* MGLMetricsManager_Private.h in Headers */,
1F2B94C0221636D900210640 /* MGLNetworkConfiguration_Private.h in Headers */,
353AFA141D65AB17005A69F4 /* NSDate+MGLAdditions.h in Headers */,
DA8848531CBAFB9800AB86E3 /* MGLCompactCalloutView.h in Headers */,
@@ -2469,7 +2469,7 @@
35D3A1E61E9BE7EB002B38EE /* MGLScaleBar.h in Headers */,
0778DD431F67556700A73B34 /* MGLComputedShapeSource.h in Headers */,
9C188C502242C96F0022FA55 /* MMEDate.h in Headers */,
- 1FCCEC34222605C400302E3B /* MGLEventsManager.h in Headers */,
+ 1FCCEC34222605C400302E3B /* MGLMetricsManager.h in Headers */,
1F6A82A221360F9D00BA5B41 /* MGLLoggingConfiguration.h in Headers */,
AC1B0916221CA14D00DB56C8 /* CLLocationManager+MMEMobileEvents.h in Headers */,
DA8848311CBAFA6200AB86E3 /* NSString+MGLAdditions.h in Headers */,
@@ -2642,7 +2642,7 @@
DABFB86D1CBE9A0F00D62B32 /* MGLAnnotationImage.h in Headers */,
DABFB8721CBE9A0F00D62B32 /* MGLUserLocation.h in Headers */,
92FC0AED207CEE16007B6B54 /* MGLShapeOfflineRegion_Private.h in Headers */,
- 1FCCEC35222605C400302E3B /* MGLEventsManager.h in Headers */,
+ 1FCCEC35222605C400302E3B /* MGLMetricsManager.h in Headers */,
927FBD001F4DB05500F8BF1F /* MGLMapSnapshotter.h in Headers */,
3566C7721D4A9198008152BC /* MGLSource_Private.h in Headers */,
353933FF1D3FB7DD003F57D7 /* MGLSymbolStyleLayer.h in Headers */,
@@ -2737,7 +2737,7 @@
353933F91D3FB79F003F57D7 /* MGLLineStyleLayer.h in Headers */,
96E516EB2000560B00A02306 /* MGLUserLocation_Private.h in Headers */,
35D13AB81D3D15E300AFB4E0 /* MGLStyleLayer.h in Headers */,
- 1FCCEC3B222607A500302E3B /* MGLEventsManager_Private.h in Headers */,
+ 1FCCEC3B222607A500302E3B /* MGLMetricsManager_Private.h in Headers */,
35136D4D1D4277FC00C20EFD /* MGLSource.h in Headers */,
DA35A2BC1CCA9A6900E826B2 /* MGLClockDirectionFormatter.h in Headers */,
96E516E82000560B00A02306 /* MGLAnnotationContainerView_Private.h in Headers */,
@@ -3261,7 +3261,7 @@
0778DD441F67556C00A73B34 /* MGLComputedShapeSource.mm in Sources */,
3557F7B21E1D27D300CCA5E6 /* MGLDistanceFormatter.m in Sources */,
40834C4B1FE05F7500C1BD0D /* TSKPinningValidatorResult.m in Sources */,
- 1FCCEC36222605C400302E3B /* MGLEventsManager.m in Sources */,
+ 1FCCEC36222605C400302E3B /* MGLMetricsManager.m in Sources */,
ACA65F472140669000537748 /* MMETrustKitProvider.m in Sources */,
40834BE71FE05E1800C1BD0D /* MMEAPIClient.m in Sources */,
DA8848591CBAFB9800AB86E3 /* MGLMapView.mm in Sources */,
@@ -3399,7 +3399,7 @@
DAA4E41D1CBB730400178DFB /* MGLGeometry.mm in Sources */,
40834C581FE05F7600C1BD0D /* TSKPinningValidatorResult.m in Sources */,
40834BFB1FE05E1800C1BD0D /* MMEAPIClient.m in Sources */,
- 1FCCEC37222605C400302E3B /* MGLEventsManager.m in Sources */,
+ 1FCCEC37222605C400302E3B /* MGLMetricsManager.m in Sources */,
ACA65F482140669100537748 /* MMETrustKitProvider.m in Sources */,
DAA4E41F1CBB730400178DFB /* MGLMultiPoint.mm in Sources */,
DD0902AA1DB1929D00C5BDCE /* MGLNetworkConfiguration.m in Sources */,
diff --git a/platform/ios/sdk-files.json b/platform/ios/sdk-files.json
index aaeba33061..51d4fbf2e1 100644
--- a/platform/ios/sdk-files.json
+++ b/platform/ios/sdk-files.json
@@ -65,7 +65,7 @@
"platform/darwin/src/MGLComputedShapeSource.mm",
"platform/darwin/src/MGLDistanceFormatter.m",
"platform/ios/vendor/mapbox-events-ios/vendor/TrustKit/TSKPinningValidatorResult.m",
- "platform/darwin/src/MGLEventsManager.m",
+ "platform/darwin/src/MGLMetricsManager.m",
"platform/ios/vendor/mapbox-events-ios/MapboxMobileEvents/MMETrustKitProvider.m",
"platform/ios/vendor/mapbox-events-ios/MapboxMobileEvents/MMEAPIClient.m",
"platform/ios/src/MGLMapView.mm",
@@ -163,7 +163,7 @@
"MGLVectorStyleLayer.h": "platform/darwin/src/MGLVectorStyleLayer.h",
"MGLNetworkConfiguration.h": "platform/darwin/src/MGLNetworkConfiguration.h",
"MGLComputedShapeSource.h": "platform/darwin/src/MGLComputedShapeSource.h",
- "MGLEventsManager.h": "platform/darwin/src/MGLEventsManager.h",
+ "MGLMetricsManager.h": "platform/darwin/src/MGLMetricsManager.h",
"MGLLoggingConfiguration.h": "platform/darwin/src/MGLLoggingConfiguration.h",
"MGLLocationManager.h": "platform/darwin/src/MGLLocationManager.h",
"MGLRasterDEMSource.h": "platform/darwin/src/MGLRasterDEMSource.h",
@@ -197,7 +197,6 @@
"MGLMapViewDelegate.h": "platform/ios/src/MGLMapViewDelegate.h",
"MGLDistanceFormatter.h": "platform/darwin/src/MGLDistanceFormatter.h",
"MGLOpenGLStyleLayer.h": "platform/darwin/src/MGLOpenGLStyleLayer.h",
- "MGLMapboxEventsDelegate.h": "platform/darwin/src/MGLMapboxEventsDelegate.h",
"MGLTileSource.h": "platform/darwin/src/MGLTileSource.h",
"MGLTilePyramidOfflineRegion.h": "platform/darwin/src/MGLTilePyramidOfflineRegion.h",
"MGLVectorTileSource.h": "platform/darwin/src/MGLVectorTileSource.h",
@@ -226,7 +225,7 @@
"MGLStyle_Private.h": "platform/darwin/src/MGLStyle_Private.h",
"MGLHeatmapStyleLayer_Private.h": "platform/darwin/src/MGLHeatmapStyleLayer_Private.h",
"NSPredicate+MGLPrivateAdditions.h": "platform/darwin/src/NSPredicate+MGLPrivateAdditions.h",
- "MGLEventsManager_Private.h": "platform/darwin/src/MGLEventsManager_Private.h",
+ "MGLMetricsManager_Private.h": "platform/darwin/src/MGLMetricsManager_Private.h",
"MGLNetworkConfiguration_Private.h": "platform/darwin/src/MGLNetworkConfiguration_Private.h",
"NSDate+MGLAdditions.h": "platform/darwin/src/NSDate+MGLAdditions.h",
"MGLCompactCalloutView.h": "platform/ios/src/MGLCompactCalloutView.h",
diff --git a/platform/ios/src/Mapbox.h b/platform/ios/src/Mapbox.h
index 6577f809ef..e7509b7653 100644
--- a/platform/ios/src/Mapbox.h
+++ b/platform/ios/src/Mapbox.h
@@ -73,4 +73,4 @@ FOUNDATION_EXPORT MGL_EXPORT const unsigned char MapboxVersionString[];
#import "MGLLoggingConfiguration.h"
#import "MGLNetworkConfiguration.h"
#import "MGLAttributedExpression.h"
-#import "MGLEventsManager.h"
+#import "MGLMetricsManager.h"
diff --git a/platform/macos/macos.xcodeproj/project.pbxproj b/platform/macos/macos.xcodeproj/project.pbxproj
index dcdf548e7d..6b5c3e431a 100644
--- a/platform/macos/macos.xcodeproj/project.pbxproj
+++ b/platform/macos/macos.xcodeproj/project.pbxproj
@@ -32,9 +32,9 @@
1FC481852098F323000D09B4 /* NSPredicate+MGLPrivateAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FC481842098F323000D09B4 /* NSPredicate+MGLPrivateAdditions.h */; };
1FF4858D2237235300F19727 /* MGLAttributedExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FF4858B2237235200F19727 /* MGLAttributedExpression.m */; };
1FF4858E2237235300F19727 /* MGLAttributedExpression.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FF4858C2237235200F19727 /* MGLAttributedExpression.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 1FCCEC4122260CCF00302E3B /* MGLEventsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCCEC3E22260CCE00302E3B /* MGLEventsManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 1FCCEC4222260CCF00302E3B /* MGLEventsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCCEC3F22260CCF00302E3B /* MGLEventsManager.m */; };
- 1FCCEC4322260CCF00302E3B /* MGLEventsManager_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCCEC4022260CCF00302E3B /* MGLEventsManager_Private.h */; };
+ 1FCCEC53222EF9FE00302E3B /* MGLMetricsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCCEC50222EF9FC00302E3B /* MGLMetricsManager.m */; };
+ 1FCCEC54222EF9FE00302E3B /* MGLMetricsManager_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCCEC51222EF9FD00302E3B /* MGLMetricsManager_Private.h */; };
+ 1FCCEC55222EF9FE00302E3B /* MGLMetricsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCCEC52222EF9FE00302E3B /* MGLMetricsManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
3508EC641D749D39009B0EE4 /* NSExpression+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3508EC621D749D39009B0EE4 /* NSExpression+MGLAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
3508EC651D749D39009B0EE4 /* NSExpression+MGLAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3508EC631D749D39009B0EE4 /* NSExpression+MGLAdditions.mm */; };
3526EABD1DF9B19800006B43 /* MGLCodingTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3526EABC1DF9B19800006B43 /* MGLCodingTests.mm */; };
@@ -348,9 +348,9 @@
1F95931A1E6DE2B600D5B294 /* MGLNSDateAdditionsTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLNSDateAdditionsTests.mm; path = ../../darwin/test/MGLNSDateAdditionsTests.mm; sourceTree = "<group>"; };
1F9EF4051FBA1B0D0063FBB0 /* mapbox_helmet.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = mapbox_helmet.pdf; sourceTree = "<group>"; };
1FC481842098F323000D09B4 /* NSPredicate+MGLPrivateAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSPredicate+MGLPrivateAdditions.h"; sourceTree = "<group>"; };
- 1FCCEC3E22260CCE00302E3B /* MGLEventsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLEventsManager.h; sourceTree = "<group>"; };
- 1FCCEC3F22260CCF00302E3B /* MGLEventsManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLEventsManager.m; sourceTree = "<group>"; };
- 1FCCEC4022260CCF00302E3B /* MGLEventsManager_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLEventsManager_Private.h; sourceTree = "<group>"; };
+ 1FCCEC50222EF9FC00302E3B /* MGLMetricsManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLMetricsManager.m; sourceTree = "<group>"; };
+ 1FCCEC51222EF9FD00302E3B /* MGLMetricsManager_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLMetricsManager_Private.h; sourceTree = "<group>"; };
+ 1FCCEC52222EF9FE00302E3B /* MGLMetricsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLMetricsManager.h; sourceTree = "<group>"; };
1FDB00CC21F8F1FD00D21389 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = "<group>"; };
1FDB00CD21F8F1FF00D21389 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = "<group>"; };
1FF4858B2237235200F19727 /* MGLAttributedExpression.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLAttributedExpression.m; sourceTree = "<group>"; };
@@ -1216,11 +1216,8 @@
DA00FC881D5EEAC3009AABC8 /* MGLAttributionInfo.h */,
DAF0D8151DFE6B1800B28378 /* MGLAttributionInfo_Private.h */,
DA00FC891D5EEAC3009AABC8 /* MGLAttributionInfo.mm */,
- 1FCCEC4022260CCF00302E3B /* MGLEventsManager_Private.h */,
1FF4858C2237235200F19727 /* MGLAttributedExpression.h */,
1FF4858B2237235200F19727 /* MGLAttributedExpression.m */,
- 1FCCEC3E22260CCE00302E3B /* MGLEventsManager.h */,
- 1FCCEC3F22260CCF00302E3B /* MGLEventsManager.m */,
556660C51E1BEA0100E2C41B /* MGLFoundation.h */,
558DE7A41E56161C00C7916D /* MGLFoundation_Private.h */,
558DE7A51E56161C00C7916D /* MGLFoundation.mm */,
@@ -1228,6 +1225,9 @@
DAE6C36E1CC31E2A00DB3429 /* MGLMapCamera.mm */,
92092EEE1F5EB10E00AF5130 /* MGLMapSnapshotter.h */,
92092EEF1F5EB10E00AF5130 /* MGLMapSnapshotter.mm */,
+ 1FCCEC52222EF9FE00302E3B /* MGLMetricsManager.h */,
+ 1FCCEC51222EF9FD00302E3B /* MGLMetricsManager_Private.h */,
+ 1FCCEC50222EF9FC00302E3B /* MGLMetricsManager.m */,
DD0902B01DB1AC6400C5BDCE /* MGLNetworkConfiguration.h */,
1F2B94C2221E22E500210640 /* MGLNetworkConfiguration_Private.h */,
DD0902AF1DB1AC6400C5BDCE /* MGLNetworkConfiguration.m */,
@@ -1315,6 +1315,7 @@
DAE6C3611CC31E0400DB3429 /* MGLOfflineStorage.h in Headers */,
749EC8912199CCB9005608D7 /* MGLStyleLayerManager.h in Headers */,
352742781D4C220900A1ECE6 /* MGLStyleValue.h in Headers */,
+ 1FCCEC55222EF9FE00302E3B /* MGLMetricsManager.h in Headers */,
DAE6C35E1CC31E0400DB3429 /* MGLMultiPoint.h in Headers */,
35602BFF1D3EA9B40050646F /* MGLStyleLayer_Private.h in Headers */,
92FC0AE4207CC8DA007B6B54 /* MGLShapeOfflineRegion_Private.h in Headers */,
@@ -1346,6 +1347,7 @@
DAC25FCA200FD5E2009BE98E /* NSExpression+MGLPrivateAdditions.h in Headers */,
DA7262071DEEDD460043BB89 /* MGLOpenGLStyleLayer.h in Headers */,
352742811D4C243B00A1ECE6 /* MGLSource.h in Headers */,
+ 1FCCEC54222EF9FE00302E3B /* MGLMetricsManager_Private.h in Headers */,
DAE6C3C21CC31F4500DB3429 /* Mapbox.h in Headers */,
DAE6C3641CC31E0400DB3429 /* MGLPolygon.h in Headers */,
DA35A2BF1CCA9B1A00E826B2 /* MGLClockDirectionFormatter.h in Headers */,
@@ -1356,8 +1358,6 @@
9250B8C32073C69100EF338C /* MGLShapeOfflineRegion.h in Headers */,
747ABE67219B2C3200523B67 /* MGLSymbolStyleLayer_Private.h in Headers */,
DD0902B31DB1AC6400C5BDCE /* MGLNetworkConfiguration.h in Headers */,
- 1FCCEC4322260CCF00302E3B /* MGLEventsManager_Private.h in Headers */,
- 1FCCEC4122260CCF00302E3B /* MGLEventsManager.h in Headers */,
DAE6C3621CC31E0400DB3429 /* MGLOverlay.h in Headers */,
DAE6C3651CC31E0400DB3429 /* MGLPolyline.h in Headers */,
DAE6C39A1CC31E2A00DB3429 /* NSProcessInfo+MGLAdditions.h in Headers */,
@@ -1634,6 +1634,7 @@
40ABDB561DB0022100372083 /* NSImage+MGLAdditions.mm in Sources */,
DAF25715201901C200367EF5 /* MGLHillshadeStyleLayer.mm in Sources */,
DAE6C3901CC31E2A00DB3429 /* MGLPointAnnotation.mm in Sources */,
+ 1FCCEC53222EF9FE00302E3B /* MGLMetricsManager.m in Sources */,
DAE6C3981CC31E2A00DB3429 /* NSBundle+MGLAdditions.m in Sources */,
DAE6C3B71CC31EF300DB3429 /* MGLMapView.mm in Sources */,
40B77E461DB11BCD003DA2FE /* NSArray+MGLAdditions.mm in Sources */,
@@ -1642,7 +1643,6 @@
DD0902B21DB1AC6400C5BDCE /* MGLNetworkConfiguration.m in Sources */,
1F7454A51ECFB00300021D39 /* MGLLight.mm in Sources */,
DAE6C3B11CC31EF300DB3429 /* MGLAnnotationImage.m in Sources */,
- 1FCCEC4222260CCF00302E3B /* MGLEventsManager.m in Sources */,
3508EC651D749D39009B0EE4 /* NSExpression+MGLAdditions.mm in Sources */,
DACC22151CF3D3E200D220D9 /* MGLFeature.mm in Sources */,
DA7262081DEEDD460043BB89 /* MGLOpenGLStyleLayer.mm in Sources */,
diff --git a/platform/macos/sdk-files.json b/platform/macos/sdk-files.json
index c5094cf8da..f69482cd8e 100644
--- a/platform/macos/sdk-files.json
+++ b/platform/macos/sdk-files.json
@@ -6,6 +6,7 @@
"platform/macos/src/NSImage+MGLAdditions.mm",
"platform/darwin/src/MGLHillshadeStyleLayer.mm",
"platform/darwin/src/MGLPointAnnotation.mm",
+ "platform/darwin/src/MGLMetricsManager.m",
"platform/darwin/src/NSBundle+MGLAdditions.m",
"platform/macos/src/MGLMapView.mm",
"platform/darwin/src/NSArray+MGLAdditions.mm",
@@ -14,7 +15,6 @@
"platform/darwin/src/MGLNetworkConfiguration.m",
"platform/darwin/src/MGLLight.mm",
"platform/macos/src/MGLAnnotationImage.m",
- "platform/darwin/src/MGLEventsManager.m",
"platform/darwin/src/NSExpression+MGLAdditions.mm",
"platform/darwin/src/MGLFeature.mm",
"platform/darwin/src/MGLOpenGLStyleLayer.mm",
@@ -93,6 +93,7 @@
"MGLMapView.h": "platform/macos/src/MGLMapView.h",
"MGLOfflineStorage.h": "platform/darwin/src/MGLOfflineStorage.h",
"MGLStyleValue.h": "platform/darwin/src/MGLStyleValue.h",
+ "MGLMetricsManager.h": "platform/darwin/src/MGLMetricsManager.h",
"MGLMultiPoint.h": "platform/darwin/src/MGLMultiPoint.h",
"MGLShapeCollection.h": "platform/darwin/src/MGLShapeCollection.h",
"MGLPointAnnotation.h": "platform/darwin/src/MGLPointAnnotation.h",
@@ -113,11 +114,9 @@
"MGLCoordinateFormatter.h": "platform/darwin/src/MGLCoordinateFormatter.h",
"MGLShapeOfflineRegion.h": "platform/darwin/src/MGLShapeOfflineRegion.h",
"MGLNetworkConfiguration.h": "platform/darwin/src/MGLNetworkConfiguration.h",
- "MGLEventsManager.h": "platform/darwin/src/MGLEventsManager.h",
"MGLOverlay.h": "platform/darwin/src/MGLOverlay.h",
"MGLPolyline.h": "platform/darwin/src/MGLPolyline.h",
"MGLLineStyleLayer.h": "platform/darwin/src/MGLLineStyleLayer.h",
- "MGLMapboxEventsDelegate.h": "platform/darwin/src/MGLMapboxEventsDelegate.h",
"MGLDistanceFormatter.h": "platform/darwin/src/MGLDistanceFormatter.h",
"MGLHeatmapStyleLayer.h": "platform/darwin/src/MGLHeatmapStyleLayer.h",
"MGLOfflineRegion.h": "platform/darwin/src/MGLOfflineRegion.h",
@@ -174,10 +173,10 @@
"NSException+MGLAdditions.h": "platform/darwin/src/NSException+MGLAdditions.h",
"MGLTileSource_Private.h": "platform/darwin/src/MGLTileSource_Private.h",
"NSExpression+MGLPrivateAdditions.h": "platform/darwin/src/NSExpression+MGLPrivateAdditions.h",
+ "MGLMetricsManager_Private.h": "platform/darwin/src/MGLMetricsManager_Private.h",
"MGLNetworkConfiguration_Private.h": "platform/darwin/src/MGLNetworkConfiguration_Private.h",
"NSCompoundPredicate+MGLAdditions.h": "platform/darwin/src/NSCompoundPredicate+MGLAdditions.h",
"MGLSymbolStyleLayer_Private.h": "platform/darwin/src/MGLSymbolStyleLayer_Private.h",
- "MGLEventsManager_Private.h": "platform/darwin/src/MGLEventsManager_Private.h",
"NSProcessInfo+MGLAdditions.h": "platform/darwin/src/NSProcessInfo+MGLAdditions.h",
"MGLRendererFrontend.h": "platform/darwin/src/MGLRendererFrontend.h",
"NSValue+MGLStyleAttributeAdditions.h": "platform/darwin/src/NSValue+MGLStyleAttributeAdditions.h",
diff --git a/platform/macos/src/Mapbox.h b/platform/macos/src/Mapbox.h
index 38d2b566db..b8c1ce4c4d 100644
--- a/platform/macos/src/Mapbox.h
+++ b/platform/macos/src/Mapbox.h
@@ -68,4 +68,4 @@ FOUNDATION_EXPORT MGL_EXPORT const unsigned char MapboxVersionString[];
#import "MGLLoggingConfiguration.h"
#import "MGLNetworkConfiguration.h"
#import "MGLAttributedExpression.h"
-#import "MGLEventsManager.h"
+#import "MGLMetricsManager.h"