[ios] Disable telemetry in simulator
When running in the simulator, disable telemetry outright instead of pointing it to the staging server.
This commit is contained in:
committed by
Minh Nguyễn
parent
b3a2c0d53f
commit
7606fc6548
@@ -11,6 +11,7 @@ Mapbox welcomes participation and contributions from everyone. If you’d like
|
||||
- Fixed an issue preventing KVO change notifications from being generated on MGLMapView’s `userTrackingMode` key path when `-setUserTrackingMode:animated:` is called. ([#4724](https://github.com/mapbox/mapbox-gl-native/pull/4724))
|
||||
- Added a `-reloadStyle:` action to MGLMapView to force a reload of the current style. ([#4728](https://github.com/mapbox/mapbox-gl-native/pull/4728))
|
||||
- A more specific user agent string is now sent with style and tile requests. ([#4012](https://github.com/mapbox/mapbox-gl-native/pull/4012))
|
||||
- Mapbox Telemetry is automatically disabled while the host application is running in the iOS Simulator. ([#4726](https://github.com/mapbox/mapbox-gl-native/pull/4726))
|
||||
- Removed unused SVG files from the SDK’s resource bundle. ([#4641](https://github.com/mapbox/mapbox-gl-native/pull/4641))
|
||||
- Deprecated `-[MGLMapView emptyMemoryCache]`. ([#4725](https://github.com/mapbox/mapbox-gl-native/pull/4725))
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user