diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m index cd6ecbd0a..c8b742204 100644 --- a/platform/ios/MGLMapboxEvents.m +++ b/platform/ios/MGLMapboxEvents.m @@ -99,6 +99,16 @@ NSNumber *scale; - (void) pushEvent:(NSString *)event withAttributes:(NSDictionary *)attributeDictionary { + // TODO Add Opt Out Checking When Built + /** + if (![[NSUserDefaults standardUserDefaults] boolForKey:@"mapbox_metrics_enabled_preference"]) { + NSLog(@"Mapbox Metrics are not enabled, so return without sending in data."); + return; + } + */ + + // TODO - Add Metrics Disabled App Wide Check + if (!event) { return; } diff --git a/platform/ios/MGLMetricsLocationManager.m b/platform/ios/MGLMetricsLocationManager.m index 08a81b71b..5eac0370d 100644 --- a/platform/ios/MGLMetricsLocationManager.m +++ b/platform/ios/MGLMetricsLocationManager.m @@ -85,14 +85,6 @@ static MGLMetricsLocationManager *sharedManager = nil; - (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations { CLLocation *loc = (CLLocation *)[locations objectAtIndex:0]; NSLog(@"didUpdateLocations() called with %lu location in array. First Location = %f, %f", (unsigned long)locations.count, loc.coordinate.latitude, loc.coordinate.longitude); - - // TODO Add Opt Out Checking When Built -/** - if (![[NSUserDefaults standardUserDefaults] boolForKey:@"mapbox_metrics_enabled_preference"]) { - NSLog(@"Mapbox Metrics are not enabled, so return without sending in data."); - return; - } -*/ // Iterate through locations to pass all data for (CLLocation *loc in locations) {