#1033 - Adding TODO to location where Opt Out and Metrics Disabled Checking will be implemented.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user