[ios] Run MGLMapboxEvents setup asynchronously (#11784)

* [ios] Run MGLMapboxEvents setup asynchronously
This commit is contained in:
Randall Lee
2018-05-22 15:10:52 -04:00
committed by GitHub
parent ba07c873aa
commit 8a02fa42ec
2 changed files with 4 additions and 1 deletions

View File

@@ -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
}