From f860169f356af37536443d8f23e8ccd610c21eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Fri, 8 May 2015 16:43:50 -0700 Subject: Refactored MGLMapboxEvents for better data management The shared `MGLMapboxEvents` now owns the only instance of `MGLMetricsLocationManager`. It also owns a `MGLMapboxEventsData` object, to which all user-specific data has been relegated. This object can be built up and torn down on the fly, whenever the opt-out preference is toggled. `MGLMapboxEvents` has also given up knowledge of the access token and now queries `MGLAccountManager` for that information, which `MGLMapView` keeps up-to-date. --- include/mbgl/ios/MGLMapboxEvents.h | 4 ---- include/mbgl/ios/MGLMetricsLocationManager.h | 9 --------- 2 files changed, 13 deletions(-) (limited to 'include/mbgl/ios') diff --git a/include/mbgl/ios/MGLMapboxEvents.h b/include/mbgl/ios/MGLMapboxEvents.h index c70c7cb335..abbd3b4b44 100644 --- a/include/mbgl/ios/MGLMapboxEvents.h +++ b/include/mbgl/ios/MGLMapboxEvents.h @@ -32,10 +32,6 @@ extern NSString *const MGLEventGestureRotateStart; // You must call these methods from the main thread. // -+ (void) setToken:(NSString *)token; -+ (void) setAppName:(NSString *)appName; -+ (void) setAppVersion:(NSString *)appVersion; -+ (void) setAppBuildNumber:(NSString *)appBuildNumber; + (void) pauseMetricsCollection; + (void) resumeMetricsCollection; diff --git a/include/mbgl/ios/MGLMetricsLocationManager.h b/include/mbgl/ios/MGLMetricsLocationManager.h index f02c76f53c..4161fc4dd0 100644 --- a/include/mbgl/ios/MGLMetricsLocationManager.h +++ b/include/mbgl/ios/MGLMetricsLocationManager.h @@ -1,13 +1,4 @@ #import @interface MGLMetricsLocationManager : NSObject - -// These methods can be called from any thread. -// -+ (instancetype)sharedManager; -- (void) startUpdatingLocation; -- (void) stopUpdatingLocation; -- (void) startMonitoringVisits; -- (void) stopMonitoringVisits; - @end -- cgit v1.2.1