summaryrefslogtreecommitdiff
path: root/platform/osx
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-04-14 09:52:04 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-04-16 22:46:23 -0700
commit7a38e568191a68e3311d36296e14c105b12c051c (patch)
tree759c6ad61fbc1202e3d914610792da48dd267711 /platform/osx
parent4175a09b4bc931004c6f5706eb3ca9b2003cecac (diff)
downloadqtlocation-mapboxgl-7a38e568191a68e3311d36296e14c105b12c051c.tar.gz
[ios] Removed alternative to -ObjC
Xcode’s static library template comes with the -ObjC linker flag by default. Instead of removing that flag, this change removes the various imperfect workarounds we’ve been using to ensure that private SDK categories link. Given the size decrease in this static library since #2966 was fixed, we should have room to spare for the more straightforward approach. Moreover, an application that uses MGLMapView in a storyboard no longer needs to add -ObjC to the application target, which bloated the entire application, including other frameworks that had no need for -ObjC. -ObjC isn’t even needed for dynamic frameworks, and the OS X SDK is only built as a dynamic framework.
Diffstat (limited to 'platform/osx')
-rw-r--r--platform/osx/platform.gyp1
-rw-r--r--platform/osx/sdk/Mapbox.m33
-rw-r--r--platform/osx/src/MGLMapView+IBAdditions.m2
-rw-r--r--platform/osx/src/MGLMapView_Private.h2
4 files changed, 0 insertions, 38 deletions
diff --git a/platform/osx/platform.gyp b/platform/osx/platform.gyp
index 229c721845..b5b12b70c1 100644
--- a/platform/osx/platform.gyp
+++ b/platform/osx/platform.gyp
@@ -143,7 +143,6 @@
],
'sources': [
- 'sdk/Mapbox.m',
'../darwin/src/NSException+MGLAdditions.h',
'../darwin/src/NSString+MGLAdditions.h',
'../darwin/src/NSString+MGLAdditions.m',
diff --git a/platform/osx/sdk/Mapbox.m b/platform/osx/sdk/Mapbox.m
deleted file mode 100644
index dc935cd265..0000000000
--- a/platform/osx/sdk/Mapbox.m
+++ /dev/null
@@ -1,33 +0,0 @@
-#import <Mapbox/Mapbox.h>
-
-#import "../src/MGLMapView_Private.h"
-#import "../../darwin/src/NSBundle+MGLAdditions.h"
-#import "../../darwin/src/NSProcessInfo+MGLAdditions.h"
-#import "../../darwin/src/NSString+MGLAdditions.h"
-
-__attribute__((constructor))
-static void InitializeMapbox() {
- static int initialized = 0;
- if (initialized) {
- return;
- }
-
- mgl_linkBundleCategory();
- mgl_linkStringCategory();
- mgl_linkProcessInfoCategory();
- mgl_linkMapViewIBCategory();
-
- [MGLAccountManager class];
- [MGLAnnotationImage class];
- [MGLMapCamera class];
- [MGLMapView class];
- [MGLMultiPoint class];
- [MGLOfflinePack class];
- [MGLOfflineStorage class];
- [MGLPointAnnotation class];
- [MGLPolygon class];
- [MGLPolyline class];
- [MGLShape class];
- [MGLStyle class];
- [MGLTilePyramidOfflineRegion class];
-}
diff --git a/platform/osx/src/MGLMapView+IBAdditions.m b/platform/osx/src/MGLMapView+IBAdditions.m
index da18760645..eada47ef90 100644
--- a/platform/osx/src/MGLMapView+IBAdditions.m
+++ b/platform/osx/src/MGLMapView+IBAdditions.m
@@ -2,8 +2,6 @@
#import "MGLMapView_Private.h"
-void mgl_linkMapViewIBCategory() {}
-
@implementation MGLMapView (IBAdditions)
+ (NS_SET_OF(NSString *) *)keyPathsForValuesAffectingStyleURL__ {
diff --git a/platform/osx/src/MGLMapView_Private.h b/platform/osx/src/MGLMapView_Private.h
index b9a112718e..76b1727925 100644
--- a/platform/osx/src/MGLMapView_Private.h
+++ b/platform/osx/src/MGLMapView_Private.h
@@ -1,7 +1,5 @@
#import "MGLMapView.h"
-void mgl_linkMapViewIBCategory();
-
@interface MGLMapView (Private)
/// True if the view or application is in a state where it is not expected to be