summaryrefslogtreecommitdiff
path: root/platform/darwin
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/darwin
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/darwin')
-rw-r--r--platform/darwin/src/MGLAccountManager.m10
-rw-r--r--platform/darwin/src/NSBundle+MGLAdditions.h2
-rw-r--r--platform/darwin/src/NSBundle+MGLAdditions.m2
-rw-r--r--platform/darwin/src/NSProcessInfo+MGLAdditions.h2
-rw-r--r--platform/darwin/src/NSProcessInfo+MGLAdditions.m2
-rw-r--r--platform/darwin/src/NSString+MGLAdditions.h2
-rw-r--r--platform/darwin/src/NSString+MGLAdditions.m2
7 files changed, 0 insertions, 22 deletions
diff --git a/platform/darwin/src/MGLAccountManager.m b/platform/darwin/src/MGLAccountManager.m
index bfaf9faae9..31baf4e249 100644
--- a/platform/darwin/src/MGLAccountManager.m
+++ b/platform/darwin/src/MGLAccountManager.m
@@ -1,8 +1,6 @@
#import "MGLAccountManager_Private.h"
-#import "MGLMapView.h"
#import "NSBundle+MGLAdditions.h"
#import "NSProcessInfo+MGLAdditions.h"
-#import "NSString+MGLAdditions.h"
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
#import "MGLMapboxEvents.h"
@@ -108,14 +106,6 @@
} else {
NSLog(@"MGLAccountManager is used in a project that doesn’t have Fabric.");
}
-
- // https://github.com/mapbox/mapbox-gl-native/issues/2966
- mgl_linkBundleCategory();
- mgl_linkStringCategory();
- mgl_linkProcessInfoCategory();
-
- // https://github.com/mapbox/mapbox-gl-native/issues/3113
- [MGLMapView class];
}
#endif
diff --git a/platform/darwin/src/NSBundle+MGLAdditions.h b/platform/darwin/src/NSBundle+MGLAdditions.h
index 52ef7fbfa7..8a3e5c3c2e 100644
--- a/platform/darwin/src/NSBundle+MGLAdditions.h
+++ b/platform/darwin/src/NSBundle+MGLAdditions.h
@@ -4,8 +4,6 @@
NS_ASSUME_NONNULL_BEGIN
-void mgl_linkBundleCategory();
-
@interface NSBundle (MGLAdditions)
/// Returns the bundle containing the SDK’s classes and Info.plist file.
diff --git a/platform/darwin/src/NSBundle+MGLAdditions.m b/platform/darwin/src/NSBundle+MGLAdditions.m
index e1f3e7c720..76d9cc0db7 100644
--- a/platform/darwin/src/NSBundle+MGLAdditions.m
+++ b/platform/darwin/src/NSBundle+MGLAdditions.m
@@ -2,8 +2,6 @@
#import "MGLAccountManager.h"
-void mgl_linkBundleCategory() {}
-
@implementation NSBundle (MGLAdditions)
+ (instancetype)mgl_frameworkBundle {
diff --git a/platform/darwin/src/NSProcessInfo+MGLAdditions.h b/platform/darwin/src/NSProcessInfo+MGLAdditions.h
index ea231d4e6a..1dc1439d53 100644
--- a/platform/darwin/src/NSProcessInfo+MGLAdditions.h
+++ b/platform/darwin/src/NSProcessInfo+MGLAdditions.h
@@ -1,7 +1,5 @@
#import <Foundation/Foundation.h>
-void mgl_linkProcessInfoCategory();
-
@interface NSProcessInfo (MGLAdditions)
/**
diff --git a/platform/darwin/src/NSProcessInfo+MGLAdditions.m b/platform/darwin/src/NSProcessInfo+MGLAdditions.m
index 3da2bf73ed..293f49538b 100644
--- a/platform/darwin/src/NSProcessInfo+MGLAdditions.m
+++ b/platform/darwin/src/NSProcessInfo+MGLAdditions.m
@@ -1,7 +1,5 @@
#import "NSProcessInfo+MGLAdditions.h"
-void mgl_linkProcessInfoCategory() {}
-
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
static NSString * const MGLIBDesignablesAgentProcessName = @"IBDesignablesAgentCocoaTouch";
#elif TARGET_OS_MAC
diff --git a/platform/darwin/src/NSString+MGLAdditions.h b/platform/darwin/src/NSString+MGLAdditions.h
index 6064f8b40f..3001624d32 100644
--- a/platform/darwin/src/NSString+MGLAdditions.h
+++ b/platform/darwin/src/NSString+MGLAdditions.h
@@ -4,8 +4,6 @@
NS_ASSUME_NONNULL_BEGIN
-void mgl_linkStringCategory();
-
@interface NSString (MGLAdditions)
/** Returns the receiver if non-empty or nil if empty. */
diff --git a/platform/darwin/src/NSString+MGLAdditions.m b/platform/darwin/src/NSString+MGLAdditions.m
index b94a5f0198..969886651b 100644
--- a/platform/darwin/src/NSString+MGLAdditions.m
+++ b/platform/darwin/src/NSString+MGLAdditions.m
@@ -1,7 +1,5 @@
#import "NSString+MGLAdditions.h"
-void mgl_linkStringCategory() {}
-
@implementation NSString (MGLAdditions)
- (nullable NSString *)mgl_stringOrNilIfEmpty