diff options
author | Jason Wray <jason@mapbox.com> | 2016-11-02 16:15:19 -0400 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2016-11-02 16:18:17 -0400 |
commit | b8a2fd390cd4b3172e85d18c1718edb41c039036 (patch) | |
tree | d505edc4ad650ed98ea6e193dbdfd08d15ce84b8 /platform/ios | |
parent | 549929cefd7073708e64e49da93e8b49fbc0db99 (diff) | |
parent | f41421ff776e8216844477ac0433c6e48fd875dd (diff) | |
download | qtlocation-mapboxgl-b8a2fd390cd4b3172e85d18c1718edb41c039036.tar.gz |
Merge branch 'release-ios-v3.3.5' into master
Diffstat (limited to 'platform/ios')
-rw-r--r-- | platform/ios/CHANGELOG.md | 7 | ||||
-rw-r--r-- | platform/ios/src/MGLMapboxEvents.m | 27 |
2 files changed, 29 insertions, 5 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index a1a6800cfa..b064c7181b 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -72,6 +72,13 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * MGLMapDebugOverdrawVisualizationMask no longer has any effect in Release builds of the SDK. This debug mask has been disabled for performance reasons. ([#5555](https://github.com/mapbox/mapbox-gl-native/pull/5555)) * Fixed a typo in the documentation for the MGLCompassDirectionFormatter class. ([#5879](https://github.com/mapbox/mapbox-gl-native/pull/5879)) +## 3.3.5 - November 2, 2016 + +* Speculatively fixed an OpenGL rendering crash. ([#6844](https://github.com/mapbox/mapbox-gl-native/pull/6844)) +* Fixed an issue with symbols not being properly stripped from the dynamic framework. The dSYM file included with the standard dynamic framework in previous releases (e.g., `mapbox-ios-sdk-3.3.4-dynamic.zip` or the `Mapbox-iOS-SDK` pod) could not be used to symbolicate crashes. ([#6531](https://github.com/mapbox/mapbox-gl-native/pull/6531)) +* Include simulator architecture slices in the dSYM file that is generated for release builds. ([#5740](https://github.com/mapbox/mapbox-gl-native/pull/5740)) +* Fixed a rare networking-related crash. ([#5932](https://github.com/mapbox/mapbox-gl-native/pull/5932)) + ## 3.3.4 - August 8, 2016 * Fixed an issue that caused the user dot to be selected when tapping an annotation that lies within the user dot’s accuracy circle. First attempt was [#5816](https://github.com/mapbox/mapbox-gl-native/pull/5816) in v3.3.2, which excluded the pulsing halo but not the accuracy circle. ([#5894](https://github.com/mapbox/mapbox-gl-native/pull/5894)) diff --git a/platform/ios/src/MGLMapboxEvents.m b/platform/ios/src/MGLMapboxEvents.m index 15b78b65ae..d86114d016 100644 --- a/platform/ios/src/MGLMapboxEvents.m +++ b/platform/ios/src/MGLMapboxEvents.m @@ -129,6 +129,7 @@ const NSTimeInterval MGLFlushInterval = 180; @implementation MGLMapboxEvents { NSString *_instanceID; + UIBackgroundTaskIdentifier _backgroundTaskIdentifier; } + (void)initialize { @@ -257,9 +258,20 @@ const NSTimeInterval MGLFlushInterval = 180; } - (void)pauseOrResumeMetricsCollectionIfRequired { + UIApplication *application = [UIApplication sharedApplication]; + // Prevent blue status bar when host app has `when in use` permission only and it is not in foreground if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorizedWhenInUse && - [UIApplication sharedApplication].applicationState == UIApplicationStateBackground) { + application.applicationState == UIApplicationStateBackground) { + + if (_backgroundTaskIdentifier == UIBackgroundTaskInvalid) { + _backgroundTaskIdentifier = [application beginBackgroundTaskWithExpirationHandler:^{ + [application endBackgroundTask:_backgroundTaskIdentifier]; + _backgroundTaskIdentifier = UIBackgroundTaskInvalid; + }]; + [self flush]; + } + [self pauseMetricsCollection]; return; } @@ -307,7 +319,10 @@ const NSTimeInterval MGLFlushInterval = 180; return; } - if ([self.eventQueue count] == 0) { + if ([self.eventQueue count] <= 1) { + [self.eventQueue removeAllObjects]; + [[UIApplication sharedApplication] endBackgroundTask:_backgroundTaskIdentifier]; + _backgroundTaskIdentifier = UIBackgroundTaskInvalid; return; } @@ -485,10 +500,12 @@ const NSTimeInterval MGLFlushInterval = 180; if (error) { [strongSelf pushDebugEvent:MGLEventTypeLocalDebug withAttributes:@{MGLEventKeyLocalDebugDescription: @"Network error", @"error": error}]; - return; + } else { + [strongSelf pushDebugEvent:MGLEventTypeLocalDebug withAttributes:@{MGLEventKeyLocalDebugDescription: @"post", + @"debug.eventsCount": @(events.count)}]; } - [strongSelf pushDebugEvent:MGLEventTypeLocalDebug withAttributes:@{MGLEventKeyLocalDebugDescription: @"post", - @"debug.eventsCount": @(events.count)}]; + [[UIApplication sharedApplication] endBackgroundTask:_backgroundTaskIdentifier]; + _backgroundTaskIdentifier = UIBackgroundTaskInvalid; }]; }); } |