diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-04-18 16:02:19 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-04-18 16:56:14 -0700 |
commit | 7606fc6548728e356bf88bb01882be11cfc0913e (patch) | |
tree | e2282570d638dafcf5f219719d1830f5c822f185 /platform/ios/src/MGLMapboxEvents.m | |
parent | b3a2c0d53f97b0444f23a7e4ee1139db58e4e567 (diff) | |
download | qtlocation-mapboxgl-7606fc6548728e356bf88bb01882be11cfc0913e.tar.gz |
[ios] Disable telemetry in simulator
When running in the simulator, disable telemetry outright instead of pointing it to the staging server.
Diffstat (limited to 'platform/ios/src/MGLMapboxEvents.m')
-rw-r--r-- | platform/ios/src/MGLMapboxEvents.m | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/ios/src/MGLMapboxEvents.m b/platform/ios/src/MGLMapboxEvents.m index f4acc01185..ce07c5602d 100644 --- a/platform/ios/src/MGLMapboxEvents.m +++ b/platform/ios/src/MGLMapboxEvents.m @@ -140,16 +140,17 @@ const NSTimeInterval MGLFlushInterval = 180; @"MGLMapboxAccountType": accountTypeNumber ?: @0, @"MGLMapboxMetricsEnabled": @YES, @"MGLMapboxMetricsDebugLoggingEnabled": @NO, -#if TARGET_OS_SIMULATOR - @"MGLTelemetryTestServerURL": @"https://cloudfront-staging.tilestream.net", -#endif }]; } } + (BOOL)isEnabled { +#if TARGET_OS_SIMULATOR + return NO; +#else return ([[NSUserDefaults standardUserDefaults] boolForKey:@"MGLMapboxMetricsEnabled"] && [[NSUserDefaults standardUserDefaults] integerForKey:@"MGLMapboxAccountType"] == 0); +#endif } - (BOOL)debugLoggingEnabled { |