fixes #3113: bring in MGLMapView via +load for Interface Builder
This commit is contained in:
@@ -18,6 +18,9 @@
|
||||
#pragma mark - Internal
|
||||
|
||||
+ (void)load {
|
||||
// Load all referenced categories due to absence of -ObjC linker flag
|
||||
[MGLCategoryLoader loadCategories];
|
||||
|
||||
// Read the initial configuration from Info.plist. The shown-in-app setting
|
||||
// preempts the Settings bundle check in -[MGLMapboxEvents init] triggered
|
||||
// by setting the access token.
|
||||
@@ -35,8 +38,6 @@
|
||||
// Can be called from any thread.
|
||||
//
|
||||
+ (instancetype) sharedManager {
|
||||
[MGLCategoryLoader loadCategories];
|
||||
|
||||
if (NSProcessInfo.processInfo.mgl_isInterfaceBuilderDesignablesAgent) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -4,15 +4,21 @@
|
||||
#import "NSProcessInfo+MGLAdditions.h"
|
||||
#import "NSString+MGLAdditions.h"
|
||||
|
||||
// https://github.com/mapbox/mapbox-gl-native/issues/2966
|
||||
#import "MGLMapView.h"
|
||||
|
||||
@implementation MGLCategoryLoader
|
||||
|
||||
+ (void)loadCategories
|
||||
{
|
||||
// https://github.com/mapbox/mapbox-gl-native/issues/2966
|
||||
//
|
||||
mgl_linkBundleCategory();
|
||||
mgl_linkProcessCategory();
|
||||
mgl_linkStringCategory();
|
||||
|
||||
// https://github.com/mapbox/mapbox-gl-native/issues/3113
|
||||
//
|
||||
NSString *description = [MGLMapView description];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user