#1225 - Starting Mapbox Events at shared instance setup time

This commit is contained in:
Brad Leege
2015-04-24 16:09:50 -05:00
parent 591c63286b
commit f96046103f

View File

@@ -2,6 +2,7 @@
#import "MapboxGL.h"
#import "NSProcessInfo+MGLAdditions.h"
#import "MGLMapboxEvents.h"
@interface MapboxGL()
@@ -24,6 +25,7 @@ static MapboxGL *_sharedManager;
void (^setupBlock)() = ^{
_sharedManager = [[self alloc] init];
_sharedManager.accessToken = token;
[MGLMapboxEvents setToken:token];
};
if ( ! [[NSThread currentThread] isMainThread]) {
dispatch_sync(dispatch_get_main_queue(), ^{