The singleton `MGLAccountManager` wants to be the sole arbiter of the access token, but each instance of `mbgl::Map` (`mbgl::DefaultFileSource` in #1607) has its own copy of the access token. Now `MGLMapView` observes for changes to the `MGLAccountManager`’s access token and synchronizes `mbgl::Map` with it.
11 lines
220 B
Objective-C
11 lines
220 B
Objective-C
#import "MGLAccountManager.h"
|
|
|
|
@interface MGLAccountManager (Private)
|
|
|
|
/** Returns the shared instance of the `MGLAccountManager` class. */
|
|
+ (instancetype)sharedManager;
|
|
|
|
@property (atomic) NSString *accessToken;
|
|
|
|
@end
|