summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorJustin R. Miller <incanus@codesorcery.net>2015-11-24 11:49:12 -0800
committerJustin R. Miller <incanus@codesorcery.net>2015-12-03 15:51:56 -0800
commit435cd9ea9e327ad16e3bf9ee598999eb1bf586aa (patch)
treebd92056109c652a05155c1997ebf5e94bae5916c /platform
parentb58e775374a988d6df2a1baee1df6170113d0875 (diff)
downloadqtlocation-mapboxgl-435cd9ea9e327ad16e3bf9ee598999eb1bf586aa.tar.gz
fixes #3113: bring in MGLMapView via +load for Interface Builder
Diffstat (limited to 'platform')
-rw-r--r--platform/ios/MGLAccountManager.m5
-rw-r--r--platform/ios/MGLCategoryLoader.m8
2 files changed, 10 insertions, 3 deletions
diff --git a/platform/ios/MGLAccountManager.m b/platform/ios/MGLAccountManager.m
index 522f3cb0b3..edc5c463f6 100644
--- a/platform/ios/MGLAccountManager.m
+++ b/platform/ios/MGLAccountManager.m
@@ -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;
}
diff --git a/platform/ios/MGLCategoryLoader.m b/platform/ios/MGLCategoryLoader.m
index 13d82b19b2..50309436b7 100644
--- a/platform/ios/MGLCategoryLoader.m
+++ b/platform/ios/MGLCategoryLoader.m
@@ -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