diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-01-05 14:37:29 +0100 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2017-07-13 00:22:54 -0400 |
commit | 73869d12dd2e651b09a158a3cbd6100801b5c397 (patch) | |
tree | adfd9784df30281a471b36c89701b7b581917ade | |
parent | a5cdbb084e489751297ffdfeb98ad208cfe03054 (diff) | |
download | qtlocation-mapboxgl-73869d12dd2e651b09a158a3cbd6100801b5c397.tar.gz |
[build] enable -fvisibility=hidden for iOS
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | platform/ios/config.cmake | 1 | ||||
-rw-r--r-- | platform/ios/ios.xcodeproj/project.pbxproj | 8 | ||||
-rw-r--r-- | platform/ios/src/MGLAnnotationImage.h | 3 | ||||
-rw-r--r-- | platform/ios/src/MGLAnnotationView.h | 3 | ||||
-rw-r--r-- | platform/ios/src/MGLMapView.h | 9 | ||||
-rw-r--r-- | platform/ios/src/MGLUserLocation.h | 2 | ||||
-rw-r--r-- | platform/ios/src/MGLUserLocationAnnotationView.h | 2 |
8 files changed, 25 insertions, 5 deletions
@@ -260,7 +260,7 @@ darwin-update-examples: .PHONY: check-public-symbols check-public-symbols: - node platform/darwin/scripts/check-public-symbols.js macOS + node platform/darwin/scripts/check-public-symbols.js macOS iOS endif #### Linux targets ##################################################### diff --git a/platform/ios/config.cmake b/platform/ios/config.cmake index dbf6780c04..efb31d2e00 100644 --- a/platform/ios/config.cmake +++ b/platform/ios/config.cmake @@ -70,6 +70,7 @@ macro(mbgl_platform_core) target_compile_options(mbgl-core PRIVATE -fobjc-arc + PRIVATE -fvisibility=hidden ) # TODO: Remove this by converting to ARC diff --git a/platform/ios/ios.xcodeproj/project.pbxproj b/platform/ios/ios.xcodeproj/project.pbxproj index 37d87fa797..0197fba173 100644 --- a/platform/ios/ios.xcodeproj/project.pbxproj +++ b/platform/ios/ios.xcodeproj/project.pbxproj @@ -191,6 +191,7 @@ 40F887701D7A1E58008ECB67 /* MGLShapeSource_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 40F8876F1D7A1DB8008ECB67 /* MGLShapeSource_Private.h */; }; 40F887711D7A1E59008ECB67 /* MGLShapeSource_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 40F8876F1D7A1DB8008ECB67 /* MGLShapeSource_Private.h */; }; 40FDA76B1CCAAA6800442548 /* MBXAnnotationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 40FDA76A1CCAAA6800442548 /* MBXAnnotationView.m */; }; + 5549A0381EF1D86B00073113 /* libmbgl-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5549A0371EF1D86B00073113 /* libmbgl-core.a */; }; 5549A0391EF2877100073113 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 554180411D2E97DE00012372 /* OpenGLES.framework */; }; 5549A03A1EF2877500073113 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 554180411D2E97DE00012372 /* OpenGLES.framework */; }; 556660CA1E1BF3A900E2C41B /* MGLFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 556660C91E1BF3A900E2C41B /* MGLFoundation.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -666,6 +667,7 @@ 40FDA7691CCAAA6800442548 /* MBXAnnotationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBXAnnotationView.h; sourceTree = "<group>"; }; 40FDA76A1CCAAA6800442548 /* MBXAnnotationView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBXAnnotationView.m; sourceTree = "<group>"; }; 554180411D2E97DE00012372 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + 5549A0371EF1D86B00073113 /* libmbgl-core.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmbgl-core.a"; path = "../../build/ios/Debug-iphonesimulator/libmbgl-core.a"; sourceTree = "<group>"; }; 556660C91E1BF3A900E2C41B /* MGLFoundation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLFoundation.h; sourceTree = "<group>"; }; 556660D71E1D085500E2C41B /* MGLVersionNumber.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MGLVersionNumber.m; path = ../../darwin/test/MGLVersionNumber.m; sourceTree = "<group>"; }; 558DE79E1E5615E400C7916D /* MGLFoundation_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLFoundation_Private.h; sourceTree = "<group>"; }; @@ -956,6 +958,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 5549A0381EF1D86B00073113 /* libmbgl-core.a in Frameworks */, DA2E88561CC036F400F24E7B /* Mapbox.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1234,6 +1237,7 @@ DA1DC9921CB6DF24006E619F /* Frameworks */ = { isa = PBXGroup; children = ( + 5549A0371EF1D86B00073113 /* libmbgl-core.a */, 36F1153B1D46080700878E1A /* libmbgl-core.a */, 36F1153C1D46080700878E1A /* libmbgl-platform-ios.a */, 554180411D2E97DE00012372 /* OpenGLES.framework */, @@ -2754,6 +2758,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + OTHER_CFLAGS = "-fvisibility=hidden"; OTHER_CPLUSPLUSFLAGS = ( "$(OTHER_CFLAGS)", "$(sqlite_cflags)", @@ -2788,6 +2793,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + OTHER_CFLAGS = "-fvisibility=hidden"; OTHER_CPLUSPLUSFLAGS = ( "$(OTHER_CFLAGS)", "$(sqlite_cflags)", @@ -2835,6 +2841,7 @@ buildSettings = { BITCODE_GENERATION_MODE = bitcode; HEADER_SEARCH_PATHS = "$(mbgl_core_INCLUDE_DIRECTORIES)"; + OTHER_CFLAGS = "-fvisibility=hidden"; OTHER_CPLUSPLUSFLAGS = ( "$(OTHER_CFLAGS)", "$(sqlite_cflags)", @@ -2861,6 +2868,7 @@ buildSettings = { BITCODE_GENERATION_MODE = bitcode; HEADER_SEARCH_PATHS = "$(mbgl_core_INCLUDE_DIRECTORIES)"; + OTHER_CFLAGS = "-fvisibility=hidden"; OTHER_CPLUSPLUSFLAGS = ( "$(OTHER_CFLAGS)", "$(sqlite_cflags)", diff --git a/platform/ios/src/MGLAnnotationImage.h b/platform/ios/src/MGLAnnotationImage.h index fbeee18624..0b5a111841 100644 --- a/platform/ios/src/MGLAnnotationImage.h +++ b/platform/ios/src/MGLAnnotationImage.h @@ -1,5 +1,7 @@ #import <UIKit/UIKit.h> +#import "MGLFoundation.h" + NS_ASSUME_NONNULL_BEGIN /** @@ -8,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN objects and may be recycled later and put into a reuse queue that is maintained by the map view. */ +MGL_EXPORT @interface MGLAnnotationImage : NSObject <NSSecureCoding> #pragma mark Initializing and Preparing the Image Object diff --git a/platform/ios/src/MGLAnnotationView.h b/platform/ios/src/MGLAnnotationView.h index 2802d31b05..4fa0f196ab 100644 --- a/platform/ios/src/MGLAnnotationView.h +++ b/platform/ios/src/MGLAnnotationView.h @@ -1,5 +1,7 @@ #import <UIKit/UIKit.h> +#import "MGLFoundation.h" + NS_ASSUME_NONNULL_BEGIN @protocol MGLAnnotation; @@ -50,6 +52,7 @@ typedef NS_ENUM(NSUInteger, MGLAnnotationViewDragState) { interactivity such as dragging, you can use an `MGLAnnotationImage` instead to conserve memory and optimize drawing performance. */ +MGL_EXPORT @interface MGLAnnotationView : UIView <NSSecureCoding> #pragma mark Initializing and Preparing the View diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h index ca765a046b..7a1d200e44 100644 --- a/platform/ios/src/MGLMapView.h +++ b/platform/ios/src/MGLMapView.h @@ -4,6 +4,7 @@ #import <UIKit/UIKit.h> #import <CoreLocation/CoreLocation.h> +#import "MGLFoundation.h" #import "MGLTypes.h" NS_ASSUME_NONNULL_BEGIN @@ -23,13 +24,13 @@ NS_ASSUME_NONNULL_BEGIN @protocol MGLFeature; /** The default deceleration rate for a map view. */ -extern const CGFloat MGLMapViewDecelerationRateNormal; +extern MGL_EXPORT const CGFloat MGLMapViewDecelerationRateNormal; /** A fast deceleration rate for a map view. */ -extern const CGFloat MGLMapViewDecelerationRateFast; +extern MGL_EXPORT const CGFloat MGLMapViewDecelerationRateFast; /** Disables deceleration in a map view. */ -extern const CGFloat MGLMapViewDecelerationRateImmediate; +extern MGL_EXPORT const CGFloat MGLMapViewDecelerationRateImmediate; /** The vertical alignment of an annotation within a map view. Used with @@ -125,7 +126,7 @@ typedef NS_ENUM(NSUInteger, MGLUserTrackingMode) { ensuring that your use adheres to the relevant terms of use. */ -IB_DESIGNABLE +MGL_EXPORT IB_DESIGNABLE @interface MGLMapView : UIView #pragma mark Creating Instances diff --git a/platform/ios/src/MGLUserLocation.h b/platform/ios/src/MGLUserLocation.h index 30bfc592ca..8c6fe46136 100644 --- a/platform/ios/src/MGLUserLocation.h +++ b/platform/ios/src/MGLUserLocation.h @@ -1,6 +1,7 @@ #import <Foundation/Foundation.h> #import <CoreLocation/CoreLocation.h> +#import "MGLFoundation.h" #import "MGLAnnotation.h" NS_ASSUME_NONNULL_BEGIN @@ -11,6 +12,7 @@ NS_ASSUME_NONNULL_BEGIN directly. Instead, you retrieve an existing `MGLUserLocation` object from the `userLocation` property of the map view displayed in your application. */ +MGL_EXPORT @interface MGLUserLocation : NSObject <MGLAnnotation, NSSecureCoding> #pragma mark Determining the User’s Position diff --git a/platform/ios/src/MGLUserLocationAnnotationView.h b/platform/ios/src/MGLUserLocationAnnotationView.h index 4b36236b8d..4d95f39cf3 100644 --- a/platform/ios/src/MGLUserLocationAnnotationView.h +++ b/platform/ios/src/MGLUserLocationAnnotationView.h @@ -1,6 +1,7 @@ #import <UIKit/UIKit.h> #import <CoreLocation/CoreLocation.h> +#import "MGLFoundation.h" #import "MGLAnnotationView.h" NS_ASSUME_NONNULL_BEGIN @@ -9,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN @class MGLUserLocation; /** View representing an `MGLUserLocation` on screen. */ +MGL_EXPORT @interface MGLUserLocationAnnotationView : MGLAnnotationView /** |