From 9f3c9aafade904fcb500b9c9189ef4afa59d3f5c Mon Sep 17 00:00:00 2001 From: Randall C Lee Date: Thu, 26 Apr 2018 16:15:12 -0400 Subject: [PATCH 1/4] [ios] Run MGLMapboxEvents setup asynchronously --- platform/darwin/src/MGLAccountManager.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/darwin/src/MGLAccountManager.m b/platform/darwin/src/MGLAccountManager.m index 73da8ddd630..13cbebf9fde 100644 --- a/platform/darwin/src/MGLAccountManager.m +++ b/platform/darwin/src/MGLAccountManager.m @@ -64,7 +64,9 @@ + (void)setAccessToken:(NSString *)accessToken { [MGLAccountManager sharedManager].accessToken = accessToken; #if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR - [MGLMapboxEvents setupWithAccessToken:accessToken]; + dispatch_async(dispatch_get_main_queue(), ^{ + [MGLMapboxEvents setupWithAccessToken:accessToken]; + }); #endif } From 990642e99881708aa67c01843024d670587f16e3 Mon Sep 17 00:00:00 2001 From: Randall C Lee Date: Thu, 26 Apr 2018 16:15:12 -0400 Subject: [PATCH 2/4] [ios] Run MGLMapboxEvents setup asynchronously --- platform/darwin/src/MGLAccountManager.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/darwin/src/MGLAccountManager.m b/platform/darwin/src/MGLAccountManager.m index 73da8ddd630..13cbebf9fde 100644 --- a/platform/darwin/src/MGLAccountManager.m +++ b/platform/darwin/src/MGLAccountManager.m @@ -64,7 +64,9 @@ + (void)setAccessToken:(NSString *)accessToken { [MGLAccountManager sharedManager].accessToken = accessToken; #if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR - [MGLMapboxEvents setupWithAccessToken:accessToken]; + dispatch_async(dispatch_get_main_queue(), ^{ + [MGLMapboxEvents setupWithAccessToken:accessToken]; + }); #endif } From b0111c3cf6ae18adfc1f96c2a9c294a3c93f81c3 Mon Sep 17 00:00:00 2001 From: Randall Lee Date: Fri, 27 Apr 2018 13:26:40 -0400 Subject: [PATCH 3/4] Update CHANGELOG.md --- platform/ios/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index c6b744395b3..735faea32ed 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -12,6 +12,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * Fixed an issue where `-[MGLMapView metersPerPixelAtLatitude:]` was removed, but not marked as unavailable. ([#11765](https://github.com/mapbox/mapbox-gl-native/pull/11765)) * Fixed an issue where selecting an onscreen annotation could move the map unintentionally. ([#11731](https://github.com/mapbox/mapbox-gl-native/pull/11731)) +* Reduced startup time by causing MGLMapboxEvents to be setup asynchronously. (https://github.com/mapbox/mapbox-gl-native/pull/11784) ## 4.0.0 - April 19, 2018 From f93d722458be62d567aa152711a014ef51a90193 Mon Sep 17 00:00:00 2001 From: Randall Lee Date: Fri, 4 May 2018 13:40:22 -0400 Subject: [PATCH 4/4] Update CHANGELOG.md --- platform/ios/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 735faea32ed..7e5b13b28c8 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -12,7 +12,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * Fixed an issue where `-[MGLMapView metersPerPixelAtLatitude:]` was removed, but not marked as unavailable. ([#11765](https://github.com/mapbox/mapbox-gl-native/pull/11765)) * Fixed an issue where selecting an onscreen annotation could move the map unintentionally. ([#11731](https://github.com/mapbox/mapbox-gl-native/pull/11731)) -* Reduced startup time by causing MGLMapboxEvents to be setup asynchronously. (https://github.com/mapbox/mapbox-gl-native/pull/11784) +* Improved application launch performance. ## 4.0.0 - April 19, 2018