summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Lee <randall.lee@mapbox.com>2018-05-22 15:10:52 -0400
committerGitHub <noreply@github.com>2018-05-22 15:10:52 -0400
commit8a02fa42ecfb959a8958ccf414b5b8564c6d4d85 (patch)
tree69d3e1e6e9c95fe6e60c2016a77302d51a66e5d6
parentba07c873aa2c4bd8ef1b185660f6feeb4b12483e (diff)
downloadqtlocation-mapboxgl-8a02fa42ecfb959a8958ccf414b5b8564c6d4d85.tar.gz
[ios] Run MGLMapboxEvents setup asynchronously (#11784)
* [ios] Run MGLMapboxEvents setup asynchronously
-rw-r--r--platform/darwin/src/MGLAccountManager.m4
-rw-r--r--platform/ios/CHANGELOG.md1
2 files changed, 4 insertions, 1 deletions
diff --git a/platform/darwin/src/MGLAccountManager.m b/platform/darwin/src/MGLAccountManager.m
index 73da8ddd63..13cbebf9fd 100644
--- a/platform/darwin/src/MGLAccountManager.m
+++ b/platform/darwin/src/MGLAccountManager.m
@@ -64,7 +64,9 @@
[MGLAccountManager sharedManager].accessToken = accessToken;
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
- [MGLMapboxEvents setupWithAccessToken:accessToken];
+ dispatch_async(dispatch_get_main_queue(), ^{
+ [MGLMapboxEvents setupWithAccessToken:accessToken];
+ });
#endif
}
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index 609bf5f606..7c9c625011 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -16,6 +16,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
* Unknown tokens in URLs are now preserved, rather than replaced with an empty string. ([#11787](https://github.com/mapbox/mapbox-gl-native/issues/11787))
* Adjusted when and how the camera transition update and finish callbacks are called, fixing recursion bugs. ([#11614](https://github.com/mapbox/mapbox-gl-native/pull/11614))
+* Improved application launch performance.
## 4.0.1 - May 14, 2018