summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-11-21 17:58:05 +0100
committerKonstantin Käfer <mail@kkaefer.com>2016-11-22 21:18:19 +0100
commitbb0faad2d619b7d4c8d49d8828a96eab204d5114 (patch)
treeb5cba14354359eecf0db0ff9789c047642f7552b
parent5929fe95881e21160b0cda6bf57fb1e1333bc1b1 (diff)
downloadqtlocation-mapboxgl-bb0faad2d619b7d4c8d49d8828a96eab204d5114.tar.gz
[build] add -fvisibility=hidden for iOS
-rw-r--r--platform/darwin/src/MGLAccountManager.h3
-rw-r--r--platform/darwin/src/MGLBackgroundStyleLayer.h1
-rw-r--r--platform/darwin/src/MGLCircleStyleLayer.h1
-rw-r--r--platform/darwin/src/MGLClockDirectionFormatter.h4
-rw-r--r--platform/darwin/src/MGLCompassDirectionFormatter.h4
-rw-r--r--platform/darwin/src/MGLCoordinateFormatter.h4
-rw-r--r--platform/darwin/src/MGLFeature.h7
-rw-r--r--platform/darwin/src/MGLFillStyleLayer.h1
-rw-r--r--platform/darwin/src/MGLForegroundStyleLayer.h1
-rw-r--r--platform/darwin/src/MGLGeoJSONSource.h1
-rw-r--r--platform/darwin/src/MGLLineStyleLayer.h1
-rw-r--r--platform/darwin/src/MGLMapCamera.h4
-rw-r--r--platform/darwin/src/MGLMultiPoint.h1
-rw-r--r--platform/darwin/src/MGLNetworkConfiguration.h3
-rw-r--r--platform/darwin/src/MGLOfflinePack.h4
-rw-r--r--platform/darwin/src/MGLOfflineStorage.h25
-rw-r--r--platform/darwin/src/MGLPointAnnotation.h1
-rw-r--r--platform/darwin/src/MGLPointCollection.h1
-rw-r--r--platform/darwin/src/MGLPolygon.h2
-rw-r--r--platform/darwin/src/MGLPolyline.h2
-rw-r--r--platform/darwin/src/MGLRasterSource.h1
-rw-r--r--platform/darwin/src/MGLRasterStyleLayer.h1
-rw-r--r--platform/darwin/src/MGLShape.h4
-rw-r--r--platform/darwin/src/MGLShapeCollection.h1
-rw-r--r--platform/darwin/src/MGLStyle.h1
-rw-r--r--platform/darwin/src/MGLStyleLayer.h1
-rw-r--r--platform/darwin/src/MGLStyleValue.h6
-rw-r--r--platform/darwin/src/MGLSymbolStyleLayer.h1
-rw-r--r--platform/darwin/src/MGLTilePyramidOfflineRegion.h4
-rw-r--r--platform/darwin/src/MGLTileSet.h1
-rw-r--r--platform/darwin/src/MGLTypes.h6
-rw-r--r--platform/darwin/src/MGLVectorSource.h1
-rw-r--r--platform/darwin/src/MGLVectorStyleLayer.h1
-rw-r--r--platform/default/mbgl/util/default_styles.hpp20
-rw-r--r--platform/ios/config.cmake1
-rw-r--r--platform/ios/ios.xcodeproj/project.pbxproj2
-rw-r--r--platform/ios/src/MGLAPIClient.h1
-rw-r--r--platform/ios/src/MGLAnnotationContainerView.h1
-rw-r--r--platform/ios/src/MGLAnnotationImage.h3
-rw-r--r--platform/ios/src/MGLAnnotationView.h3
-rw-r--r--platform/ios/src/MGLCompactCalloutView.h2
-rw-r--r--platform/ios/src/MGLFaux3DUserLocationAnnotationView.h1
-rw-r--r--platform/ios/src/MGLLocationManager.h4
-rw-r--r--platform/ios/src/MGLMapView.h1
-rw-r--r--platform/ios/src/MGLMapboxEvents.h1
-rw-r--r--platform/ios/src/MGLUserLocation.h3
-rw-r--r--platform/ios/src/MGLUserLocationAnnotationView.h1
-rw-r--r--platform/ios/uitest/ios-tests.xcodeproj/project.pbxproj1
-rw-r--r--platform/macos/macos.xcodeproj/project.pbxproj1
-rw-r--r--platform/macos/src/MGLAnnotationImage.h1
-rw-r--r--platform/macos/src/MGLAttributionButton.h3
-rw-r--r--platform/macos/src/MGLCompassCell.h3
-rw-r--r--platform/macos/src/MGLMapView.h1
-rw-r--r--platform/macos/src/MGLOpenGLLayer.h3
54 files changed, 123 insertions, 34 deletions
diff --git a/platform/darwin/src/MGLAccountManager.h b/platform/darwin/src/MGLAccountManager.h
index fe602aa210..f241c8fd47 100644
--- a/platform/darwin/src/MGLAccountManager.h
+++ b/platform/darwin/src/MGLAccountManager.h
@@ -1,4 +1,4 @@
-#import <Foundation/Foundation.h>
+#import "MGLTypes.h"
NS_ASSUME_NONNULL_BEGIN
@@ -6,6 +6,7 @@ NS_ASSUME_NONNULL_BEGIN
The MGLAccountManager object provides a global way to set a Mapbox API access
token.
*/
+MGL_EXTERN
@interface MGLAccountManager : NSObject
#pragma mark Authorizing Access
diff --git a/platform/darwin/src/MGLBackgroundStyleLayer.h b/platform/darwin/src/MGLBackgroundStyleLayer.h
index a70383cc9c..5855d2f369 100644
--- a/platform/darwin/src/MGLBackgroundStyleLayer.h
+++ b/platform/darwin/src/MGLBackgroundStyleLayer.h
@@ -12,6 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
`style` and obtain the background layer using the `-[MGLStyle layerWithIdentifier:]`
method and passing `background` for the identifier.
*/
+MGL_EXTERN
@interface MGLBackgroundStyleLayer : MGLStyleLayer
- (instancetype)initWithIdentifier:(NSString *)identifier NS_DESIGNATED_INITIALIZER;
diff --git a/platform/darwin/src/MGLCircleStyleLayer.h b/platform/darwin/src/MGLCircleStyleLayer.h
index da7076e7d1..a39d6d11cb 100644
--- a/platform/darwin/src/MGLCircleStyleLayer.h
+++ b/platform/darwin/src/MGLCircleStyleLayer.h
@@ -44,6 +44,7 @@ typedef NS_ENUM(NSUInteger, MGLCirclePitchScale) {
`MGLMapView` for its `style` and obtain existing layers using the
`-[MGLStyle layerWithIdentifier:]` method.
*/
+MGL_EXTERN
@interface MGLCircleStyleLayer : MGLVectorStyleLayer
#pragma mark - Accessing the Paint Attributes
diff --git a/platform/darwin/src/MGLClockDirectionFormatter.h b/platform/darwin/src/MGLClockDirectionFormatter.h
index ea427aa7b1..8d33760db5 100644
--- a/platform/darwin/src/MGLClockDirectionFormatter.h
+++ b/platform/darwin/src/MGLClockDirectionFormatter.h
@@ -1,6 +1,7 @@
-#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
+#import "MGLTypes.h"
+
NS_ASSUME_NONNULL_BEGIN
/**
@@ -14,6 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
irrespective of the user’s orientation, use `MGLCompassDirectionFormatter`
instead.
*/
+MGL_EXTERN
@interface MGLClockDirectionFormatter : NSFormatter
/**
diff --git a/platform/darwin/src/MGLCompassDirectionFormatter.h b/platform/darwin/src/MGLCompassDirectionFormatter.h
index fde26ba42a..c259ad9ffa 100644
--- a/platform/darwin/src/MGLCompassDirectionFormatter.h
+++ b/platform/darwin/src/MGLCompassDirectionFormatter.h
@@ -1,6 +1,7 @@
-#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
+#import "MGLTypes.h"
+
NS_ASSUME_NONNULL_BEGIN
/**
@@ -12,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
irrespective of the user’s current location. To format a direction relative to
the user’s current location, use `MGLClockDirectionFormatter` instead.
*/
+MGL_EXTERN
@interface MGLCompassDirectionFormatter : NSFormatter
/**
diff --git a/platform/darwin/src/MGLCoordinateFormatter.h b/platform/darwin/src/MGLCoordinateFormatter.h
index 909c1e8935..1a941308ff 100644
--- a/platform/darwin/src/MGLCoordinateFormatter.h
+++ b/platform/darwin/src/MGLCoordinateFormatter.h
@@ -1,6 +1,7 @@
-#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
+#import "MGLTypes.h"
+
NS_ASSUME_NONNULL_BEGIN
/**
@@ -8,6 +9,7 @@ NS_ASSUME_NONNULL_BEGIN
geographic coordinate pairs. Use this class to create localized coordinate
strings when displaying location information to users.
*/
+MGL_EXTERN
@interface MGLCoordinateFormatter : NSFormatter
/**
diff --git a/platform/darwin/src/MGLFeature.h b/platform/darwin/src/MGLFeature.h
index 384c5a073e..94349507e6 100644
--- a/platform/darwin/src/MGLFeature.h
+++ b/platform/darwin/src/MGLFeature.h
@@ -117,6 +117,7 @@ NS_ASSUME_NONNULL_BEGIN
The `MGLPointFeature` class represents a point in a
<a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
*/
+MGL_EXTERN
@interface MGLPointFeature : MGLPointAnnotation <MGLFeature>
@end
@@ -124,6 +125,7 @@ NS_ASSUME_NONNULL_BEGIN
The `MGLPolylineFeature` class represents a polyline in a
<a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
*/
+MGL_EXTERN
@interface MGLPolylineFeature : MGLPolyline <MGLFeature>
@end
@@ -131,6 +133,7 @@ NS_ASSUME_NONNULL_BEGIN
The `MGLPolygonFeature` class represents a polygon in a
<a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
*/
+MGL_EXTERN
@interface MGLPolygonFeature : MGLPolygon <MGLFeature>
@end
@@ -138,6 +141,7 @@ NS_ASSUME_NONNULL_BEGIN
The `MGLPointCollectionFeature` class represents a multipoint in a
<a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
*/
+MGL_EXTERN
@interface MGLPointCollectionFeature : MGLPointCollection <MGLFeature>
@end
@@ -145,6 +149,7 @@ NS_ASSUME_NONNULL_BEGIN
The `MGLMultiPolylineFeature` class represents a multipolyline in a
<a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
*/
+MGL_EXTERN
@interface MGLMultiPolylineFeature : MGLMultiPolyline <MGLFeature>
@end
@@ -152,6 +157,7 @@ NS_ASSUME_NONNULL_BEGIN
The `MGLMultiPolygonFeature` class represents a multipolygon in a
<a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
*/
+MGL_EXTERN
@interface MGLMultiPolygonFeature : MGLMultiPolygon <MGLFeature>
@end
@@ -159,6 +165,7 @@ NS_ASSUME_NONNULL_BEGIN
The `MGLShapeCollectionFeature` class represents a shape collection in a
<a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
*/
+MGL_EXTERN
@interface MGLShapeCollectionFeature : MGLShapeCollection <MGLFeature>
@property (nonatomic, copy, readonly) NS_ARRAY_OF(MGLShape<MGLFeature> *) *shapes;
diff --git a/platform/darwin/src/MGLFillStyleLayer.h b/platform/darwin/src/MGLFillStyleLayer.h
index 799fa380c0..4063611cac 100644
--- a/platform/darwin/src/MGLFillStyleLayer.h
+++ b/platform/darwin/src/MGLFillStyleLayer.h
@@ -28,6 +28,7 @@ typedef NS_ENUM(NSUInteger, MGLFillTranslateAnchor) {
`MGLMapView` for its `style` and obtain existing layers using the
`-[MGLStyle layerWithIdentifier:]` method.
*/
+MGL_EXTERN
@interface MGLFillStyleLayer : MGLVectorStyleLayer
#pragma mark - Accessing the Paint Attributes
diff --git a/platform/darwin/src/MGLForegroundStyleLayer.h b/platform/darwin/src/MGLForegroundStyleLayer.h
index 642dde4992..ae45315bfb 100644
--- a/platform/darwin/src/MGLForegroundStyleLayer.h
+++ b/platform/darwin/src/MGLForegroundStyleLayer.h
@@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
subclasses of this class. Instead, create instances of `MGLRasterStyleLayer`
and the concrete subclasses of `MGLVectorStyleLayer`.
*/
+MGL_EXTERN
@interface MGLForegroundStyleLayer : MGLStyleLayer
#pragma mark Initializing a Style Layer
diff --git a/platform/darwin/src/MGLGeoJSONSource.h b/platform/darwin/src/MGLGeoJSONSource.h
index 30232c6211..00c8c7dfa7 100644
--- a/platform/darwin/src/MGLGeoJSONSource.h
+++ b/platform/darwin/src/MGLGeoJSONSource.h
@@ -61,6 +61,7 @@ extern const MGLGeoJSONSourceOption MGLGeoJSONSourceOptionSimplificationToleranc
@see <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources-geojson">The
style specification.</a>
*/
+MGL_EXTERN
@interface MGLGeoJSONSource : MGLSource
#pragma mark Initializing a Source
diff --git a/platform/darwin/src/MGLLineStyleLayer.h b/platform/darwin/src/MGLLineStyleLayer.h
index 68b0a73a2e..3697068305 100644
--- a/platform/darwin/src/MGLLineStyleLayer.h
+++ b/platform/darwin/src/MGLLineStyleLayer.h
@@ -68,6 +68,7 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslateAnchor) {
`MGLMapView` for its `style` and obtain existing layers using the
`-[MGLStyle layerWithIdentifier:]` method.
*/
+MGL_EXTERN
@interface MGLLineStyleLayer : MGLVectorStyleLayer
#pragma mark - Accessing the Layout Attributes
diff --git a/platform/darwin/src/MGLMapCamera.h b/platform/darwin/src/MGLMapCamera.h
index f6bff36280..bb8861e6d1 100644
--- a/platform/darwin/src/MGLMapCamera.h
+++ b/platform/darwin/src/MGLMapCamera.h
@@ -1,13 +1,15 @@
-#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import <CoreLocation/CoreLocation.h>
+#import "MGLTypes.h"
+
NS_ASSUME_NONNULL_BEGIN
/**
An `MGLMapCamera` object represents a viewpoint from which the user observes
some point on an `MGLMapView`.
*/
+MGL_EXTERN
@interface MGLMapCamera : NSObject <NSSecureCoding, NSCopying>
/** Coordinate at the center of the map view. */
diff --git a/platform/darwin/src/MGLMultiPoint.h b/platform/darwin/src/MGLMultiPoint.h
index 69c7295842..a079ac697b 100644
--- a/platform/darwin/src/MGLMultiPoint.h
+++ b/platform/darwin/src/MGLMultiPoint.h
@@ -13,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
class to access information about the specific points associated with the line
or polygon.
*/
+MGL_EXTERN
@interface MGLMultiPoint : MGLShape
/**
diff --git a/platform/darwin/src/MGLNetworkConfiguration.h b/platform/darwin/src/MGLNetworkConfiguration.h
index 88fb07e111..6b3a537580 100644
--- a/platform/darwin/src/MGLNetworkConfiguration.h
+++ b/platform/darwin/src/MGLNetworkConfiguration.h
@@ -1,4 +1,4 @@
-#import <Foundation/Foundation.h>
+#import "MGLTypes.h"
NS_ASSUME_NONNULL_BEGIN
@@ -10,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN
by any applications via the `MGLMapboxAPIBaseURL` dictionary key in the
application's `Info.plist`.
*/
+MGL_EXTERN
@interface MGLNetworkConfiguration : NSObject
/// Returns the shared instance of the `MGLNetworkConfiguration` class.
diff --git a/platform/darwin/src/MGLOfflinePack.h b/platform/darwin/src/MGLOfflinePack.h
index a14d001d0f..dad5d5e330 100644
--- a/platform/darwin/src/MGLOfflinePack.h
+++ b/platform/darwin/src/MGLOfflinePack.h
@@ -1,5 +1,4 @@
-#import <Foundation/Foundation.h>
-
+#import "MGLTypes.h"
#import "MGLOfflineRegion.h"
NS_ASSUME_NONNULL_BEGIN
@@ -100,6 +99,7 @@ typedef struct MGLOfflinePackProgress {
`+[MGLOfflineStorage addPackForRegion:withContext:completionHandler:]` method.
A pack created using `-[MGLOfflinePack init]` is immediately invalid.
*/
+MGL_EXTERN
@interface MGLOfflinePack : NSObject
/**
diff --git a/platform/darwin/src/MGLOfflineStorage.h b/platform/darwin/src/MGLOfflineStorage.h
index b3fb7a2d54..4ca5608967 100644
--- a/platform/darwin/src/MGLOfflineStorage.h
+++ b/platform/darwin/src/MGLOfflineStorage.h
@@ -1,5 +1,3 @@
-#import <Foundation/Foundation.h>
-
#import "MGLTypes.h"
NS_ASSUME_NONNULL_BEGIN
@@ -24,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
alternatively observe KVO change notifications to the pack’s `progress` key
path.
*/
-extern const NSNotificationName MGLOfflinePackProgressChangedNotification;
+MGL_EXTERN const NSNotificationName MGLOfflinePackProgressChangedNotification;
/**
Posted by the shared `MGLOfflineStorage` object whenever an `MGLOfflinePack`
@@ -37,7 +35,7 @@ extern const NSNotificationName MGLOfflinePackProgressChangedNotification;
`userInfo` dictionary contains the error object in the
`MGLOfflinePackErrorUserInfoKey` key.
*/
-extern const NSNotificationName MGLOfflinePackErrorNotification;
+MGL_EXTERN const NSNotificationName MGLOfflinePackErrorNotification;
/**
Posted by the shared `MGLOfflineStorage` object when the maximum number of
@@ -52,7 +50,7 @@ extern const NSNotificationName MGLOfflinePackErrorNotification;
calling the `-[MGLOfflineStorage removePack:withCompletionHandler:]` method.
Contact your Mapbox sales representative to have the limit raised.
*/
-extern const NSNotificationName MGLOfflinePackMaximumMapboxTilesReachedNotification;
+MGL_EXTERN const NSNotificationName MGLOfflinePackMaximumMapboxTilesReachedNotification;
/**
A key in the `userInfo` property of a notification posted by `MGLOfflinePack`.
@@ -65,9 +63,9 @@ typedef NSString *MGLOfflinePackUserInfoKey NS_EXTENSIBLE_STRING_ENUM;
`MGLOfflinePackProgressChangedNotification` notification. Call `-integerValue`
on the object to receive the `MGLOfflinePackState`-typed state.
*/
-extern const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyState;
+MGL_EXTERN const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyState;
-extern NSString * const MGLOfflinePackStateUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyState")));
+MGL_EXTERN NSString * const MGLOfflinePackStateUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyState")));
/**
The key for an `NSValue` object that indicates an offline pack’s current
@@ -76,9 +74,9 @@ extern NSString * const MGLOfflinePackStateUserInfoKey __attribute__((deprecated
`-MGLOfflinePackProgressValue` on the object to receive the
`MGLOfflinePackProgress`-typed progress.
*/
-extern const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyProgress;
+MGL_EXTERN const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyProgress;
-extern NSString * const MGLOfflinePackProgressUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyProgress")));
+MGL_EXTERN NSString * const MGLOfflinePackProgressUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyProgress")));
/**
The key for an `NSError` object that is encountered in the course of
@@ -86,9 +84,9 @@ extern NSString * const MGLOfflinePackProgressUserInfoKey __attribute__((depreca
an `MGLOfflinePackErrorNotification` notification. The error’s domain is
`MGLErrorDomain`. See `MGLErrorCode` for possible error codes.
*/
-extern const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyError;
+MGL_EXTERN const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyError;
-extern NSString * const MGLOfflinePackErrorUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyError")));
+MGL_EXTERN NSString * const MGLOfflinePackErrorUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyError")));
/**
The key for an `NSNumber` object that indicates the maximum number of
@@ -98,9 +96,9 @@ extern NSString * const MGLOfflinePackErrorUserInfoKey __attribute__((deprecated
`-unsignedLongLongValue` on the object to receive the `uint64_t`-typed tile
limit.
*/
-extern const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyMaximumCount;
+MGL_EXTERN const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyMaximumCount;
-extern NSString * const MGLOfflinePackMaximumCountUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyMaximumCount")));
+MGL_EXTERN NSString * const MGLOfflinePackMaximumCountUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyMaximumCount")));
/**
A block to be called once an offline pack has been completely created and
@@ -135,6 +133,7 @@ typedef void (^MGLOfflinePackRemovalCompletionHandler)(NSError * _Nullable error
fact that offline resources are stored in a database. The shared object
maintains a canonical collection of offline packs in its `packs` property.
*/
+MGL_EXTERN
@interface MGLOfflineStorage : NSObject
/**
diff --git a/platform/darwin/src/MGLPointAnnotation.h b/platform/darwin/src/MGLPointAnnotation.h
index b552912f97..df49467fc3 100644
--- a/platform/darwin/src/MGLPointAnnotation.h
+++ b/platform/darwin/src/MGLPointAnnotation.h
@@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
situations where all you want to do is associate a point on the map with a
title.
*/
+MGL_EXTERN
@interface MGLPointAnnotation : MGLShape
/**
diff --git a/platform/darwin/src/MGLPointCollection.h b/platform/darwin/src/MGLPointCollection.h
index db497d0a52..bd5a5e77e4 100644
--- a/platform/darwin/src/MGLPointCollection.h
+++ b/platform/darwin/src/MGLPointCollection.h
@@ -15,6 +15,7 @@
to the map view's style, the point collection represents as a group of distinct
annotations.
*/
+MGL_EXTERN
@interface MGLPointCollection : MGLShape <MGLOverlay>
/**
diff --git a/platform/darwin/src/MGLPolygon.h b/platform/darwin/src/MGLPolygon.h
index 3d5b36abb6..6523c76c5d 100644
--- a/platform/darwin/src/MGLPolygon.h
+++ b/platform/darwin/src/MGLPolygon.h
@@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
are provided. The first and last points are connected to each other to create
the closed shape.
*/
+MGL_EXTERN
@interface MGLPolygon : MGLMultiPoint <MGLOverlay>
/**
@@ -64,6 +65,7 @@ NS_ASSUME_NONNULL_BEGIN
@note `MGLMultiPolygon` objects cannot be added to a map view using
`-[MGLMapView addAnnotations:]` and related methods.
*/
+MGL_EXTERN
@interface MGLMultiPolygon : MGLShape <MGLOverlay>
/**
diff --git a/platform/darwin/src/MGLPolyline.h b/platform/darwin/src/MGLPolyline.h
index d0274b44e3..93b8d04ac3 100644
--- a/platform/darwin/src/MGLPolyline.h
+++ b/platform/darwin/src/MGLPolyline.h
@@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
the order they are provided. The first and last points are not connected to
each other.
*/
+MGL_EXTERN
@interface MGLPolyline : MGLMultiPoint <MGLOverlay>
/**
@@ -39,6 +40,7 @@ NS_ASSUME_NONNULL_BEGIN
@note `MGLMultiPolyline` objects cannot be added to a map view using
`-[MGLMapView addAnnotations:]` and related methods.
*/
+MGL_EXTERN
@interface MGLMultiPolyline : MGLShape <MGLOverlay>
/**
diff --git a/platform/darwin/src/MGLRasterSource.h b/platform/darwin/src/MGLRasterSource.h
index 78f5af8a6a..13bfcdee6e 100644
--- a/platform/darwin/src/MGLRasterSource.h
+++ b/platform/darwin/src/MGLRasterSource.h
@@ -13,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
@see <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources-raster">The
style specification.</a>
*/
+MGL_EXTERN
@interface MGLRasterSource : MGLSource
#pragma mark Initializing a Source
diff --git a/platform/darwin/src/MGLRasterStyleLayer.h b/platform/darwin/src/MGLRasterStyleLayer.h
index afae85001e..c331613e88 100644
--- a/platform/darwin/src/MGLRasterStyleLayer.h
+++ b/platform/darwin/src/MGLRasterStyleLayer.h
@@ -12,6 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
`MGLMapView` for its `style` and obtain existing layers using the
`-[MGLStyle layerWithIdentifier:]` method.
*/
+MGL_EXTERN
@interface MGLRasterStyleLayer : MGLForegroundStyleLayer
#pragma mark - Accessing the Paint Attributes
diff --git a/platform/darwin/src/MGLShape.h b/platform/darwin/src/MGLShape.h
index ce9375c910..864a33d4fe 100644
--- a/platform/darwin/src/MGLShape.h
+++ b/platform/darwin/src/MGLShape.h
@@ -1,5 +1,4 @@
-#import <Foundation/Foundation.h>
-
+#import "MGLTypes.h"
#import "MGLAnnotation.h"
NS_ASSUME_NONNULL_BEGIN
@@ -11,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN
and providing an appropriate value for the coordinate property inherited from
the `MGLAnnotation` protocol.
*/
+MGL_EXTERN
@interface MGLShape : NSObject <MGLAnnotation>
/**
diff --git a/platform/darwin/src/MGLShapeCollection.h b/platform/darwin/src/MGLShapeCollection.h
index a617223ea7..df115a8c59 100644
--- a/platform/darwin/src/MGLShapeCollection.h
+++ b/platform/darwin/src/MGLShapeCollection.h
@@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
@note `MGLShapeCollection` objects cannot be added to a map view using
`-[MGLMapView addAnnotations:]` and related methods.
*/
+MGL_EXTERN
@interface MGLShapeCollection : MGLShape
/**
diff --git a/platform/darwin/src/MGLStyle.h b/platform/darwin/src/MGLStyle.h
index 7f01c230c5..3abb7479bc 100644
--- a/platform/darwin/src/MGLStyle.h
+++ b/platform/darwin/src/MGLStyle.h
@@ -35,6 +35,7 @@ static const NSInteger MGLStyleDefaultVersion = 9;
by Mapbox.
<a href="https://www.mapbox.com/maps/">Learn more about Mapbox default styles</a>.
*/
+MGL_EXTERN
@interface MGLStyle : NSObject
#pragma mark Default Style URLs
diff --git a/platform/darwin/src/MGLStyleLayer.h b/platform/darwin/src/MGLStyleLayer.h
index 4032be9297..354115e98a 100644
--- a/platform/darwin/src/MGLStyleLayer.h
+++ b/platform/darwin/src/MGLStyleLayer.h
@@ -18,6 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
`MGLBackgroundStyleLayer` and the concrete subclasses of
`MGLForegroundStyleLayer`.
*/
+MGL_EXTERN
@interface MGLStyleLayer : NSObject
#pragma mark Initializing a Style Layer
diff --git a/platform/darwin/src/MGLStyleValue.h b/platform/darwin/src/MGLStyleValue.h
index ab5e76bbe3..05803e4bc3 100644
--- a/platform/darwin/src/MGLStyleValue.h
+++ b/platform/darwin/src/MGLStyleValue.h
@@ -1,6 +1,7 @@
-#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
+#import "MGLTypes.h"
+
NS_ASSUME_NONNULL_BEGIN
/**
@@ -25,6 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
<li>`NSArray`</li>
</ul>
*/
+MGL_EXTERN
@interface MGLStyleValue<T> : NSObject
#pragma mark Creating a Style Value
@@ -68,6 +70,7 @@ NS_ASSUME_NONNULL_BEGIN
The `MGLStyleConstantValue` class takes a generic parameter `T` that indicates
the Foundation class being wrapped by this class.
*/
+MGL_EXTERN
@interface MGLStyleConstantValue<T> : MGLStyleValue<T>
#pragma mark Creating a Style Constant Value
@@ -111,6 +114,7 @@ NS_ASSUME_NONNULL_BEGIN
The `MGLStyleFunction` class takes a generic parameter `T` that indicates the
Foundation class being wrapped by this class.
*/
+MGL_EXTERN
@interface MGLStyleFunction<T> : MGLStyleValue<T>
#pragma mark Creating a Style Function
diff --git a/platform/darwin/src/MGLSymbolStyleLayer.h b/platform/darwin/src/MGLSymbolStyleLayer.h
index dc0cd236c8..c73668e57d 100644
--- a/platform/darwin/src/MGLSymbolStyleLayer.h
+++ b/platform/darwin/src/MGLSymbolStyleLayer.h
@@ -228,6 +228,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
`MGLMapView` for its `style` and obtain existing layers using the
`-[MGLStyle layerWithIdentifier:]` method.
*/
+MGL_EXTERN
@interface MGLSymbolStyleLayer : MGLVectorStyleLayer
#pragma mark - Accessing the Layout Attributes
diff --git a/platform/darwin/src/MGLTilePyramidOfflineRegion.h b/platform/darwin/src/MGLTilePyramidOfflineRegion.h
index 4e9f394e74..ddcb0d2e2c 100644
--- a/platform/darwin/src/MGLTilePyramidOfflineRegion.h
+++ b/platform/darwin/src/MGLTilePyramidOfflineRegion.h
@@ -1,5 +1,4 @@
-#import <Foundation/Foundation.h>
-
+#import "MGLTypes.h"
#import "MGLOfflineRegion.h"
#import "MGLGeometry.h"
@@ -9,6 +8,7 @@ NS_ASSUME_NONNULL_BEGIN
An offline region defined by a style URL, geographic coordinate bounds, and
range of zoom levels.
*/
+MGL_EXTERN
@interface MGLTilePyramidOfflineRegion : NSObject <MGLOfflineRegion, NSSecureCoding, NSCopying>
/**
diff --git a/platform/darwin/src/MGLTileSet.h b/platform/darwin/src/MGLTileSet.h
index 08a34338b1..729d070eaf 100644
--- a/platform/darwin/src/MGLTileSet.h
+++ b/platform/darwin/src/MGLTileSet.h
@@ -15,6 +15,7 @@ typedef NS_ENUM(NSUInteger, MGLTileSetScheme) {
`MGLRasterSource` instead of an `NSURL` representing a TileJSON URL to create a
source.
*/
+MGL_EXTERN
@interface MGLTileSet : NSObject
/**
diff --git a/platform/darwin/src/MGLTypes.h b/platform/darwin/src/MGLTypes.h
index e9e05bc684..bbafc26b1b 100644
--- a/platform/darwin/src/MGLTypes.h
+++ b/platform/darwin/src/MGLTypes.h
@@ -2,6 +2,12 @@
#pragma once
+#ifdef __cplusplus
+#define MGL_EXTERN extern "C" __attribute__((visibility ("default")))
+#else
+#define MGL_EXTERN extern __attribute__((visibility ("default")))
+#endif
+
#if TARGET_OS_IPHONE
@class UIImage;
#define MGLImage UIImage
diff --git a/platform/darwin/src/MGLVectorSource.h b/platform/darwin/src/MGLVectorSource.h
index 6cfab09489..74ca44d987 100644
--- a/platform/darwin/src/MGLVectorSource.h
+++ b/platform/darwin/src/MGLVectorSource.h
@@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
@see <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources-vector">The
style specification.</a>
*/
+MGL_EXTERN
@interface MGLVectorSource : MGLSource
#pragma mark Initializing a Source
diff --git a/platform/darwin/src/MGLVectorStyleLayer.h b/platform/darwin/src/MGLVectorStyleLayer.h
index 13bb9e79a9..9834eed166 100644
--- a/platform/darwin/src/MGLVectorStyleLayer.h
+++ b/platform/darwin/src/MGLVectorStyleLayer.h
@@ -13,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
subclasses: `MGLCircleStyleLayer`, `MGLFillStyleLayer`, `MGLLineStyleLayer`,
and `MGLSymbolStyleLayer`.
*/
+MGL_EXTERN
@interface MGLVectorStyleLayer : MGLForegroundStyleLayer
#pragma mark Refining a Style Layer’s Content
diff --git a/platform/default/mbgl/util/default_styles.hpp b/platform/default/mbgl/util/default_styles.hpp
index eb7e034722..ce081c0fd3 100644
--- a/platform/default/mbgl/util/default_styles.hpp
+++ b/platform/default/mbgl/util/default_styles.hpp
@@ -3,6 +3,14 @@
#include <vector>
#include <string>
+#ifndef MGL_EXTERN
+#ifdef __cplusplus
+#define MGL_EXTERN extern "C" __attribute__((visibility ("default")))
+#else
+#define MGL_EXTERN extern __attribute__((visibility ("default")))
+#endif
+#endif
+
namespace mbgl {
namespace util {
namespace default_styles {
@@ -12,12 +20,12 @@ struct DefaultStyle {
const char* name;
};
-extern const DefaultStyle streets;
-extern const DefaultStyle outdoors;
-extern const DefaultStyle light;
-extern const DefaultStyle dark;
-extern const DefaultStyle satellite;
-extern const DefaultStyle satelliteStreets;
+MGL_EXTERN const DefaultStyle streets;
+MGL_EXTERN const DefaultStyle outdoors;
+MGL_EXTERN const DefaultStyle light;
+MGL_EXTERN const DefaultStyle dark;
+MGL_EXTERN const DefaultStyle satellite;
+MGL_EXTERN const DefaultStyle satelliteStreets;
const DefaultStyle orderedStyles[] = {
streets, outdoors, light, dark, satellite, satelliteStreets,
diff --git a/platform/ios/config.cmake b/platform/ios/config.cmake
index 17bfaa8b93..19e8f25fc6 100644
--- a/platform/ios/config.cmake
+++ b/platform/ios/config.cmake
@@ -5,6 +5,7 @@ macro(mbgl_platform_core)
set_xcode_property(mbgl-core ENABLE_BITCODE $<$<CONFIG:Release>:YES>)
set_xcode_property(mbgl-core BITCODE_GENERATION_MODE bitcode)
set_xcode_property(mbgl-core ONLY_ACTIVE_ARCH $<$<CONFIG:Debug>:YES>)
+ set_xcode_property(mbgl-core GCC_SYMBOLS_PRIVATE_EXTERN YES)
target_sources(mbgl-core
# Loop
diff --git a/platform/ios/ios.xcodeproj/project.pbxproj b/platform/ios/ios.xcodeproj/project.pbxproj
index 174d8269b9..d3c783c4a7 100644
--- a/platform/ios/ios.xcodeproj/project.pbxproj
+++ b/platform/ios/ios.xcodeproj/project.pbxproj
@@ -2183,6 +2183,7 @@
"DEBUG=1",
"$(inherited)",
);
+ GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -2229,6 +2230,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
+ GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
diff --git a/platform/ios/src/MGLAPIClient.h b/platform/ios/src/MGLAPIClient.h
index 0f8926d360..7a62d3bd48 100644
--- a/platform/ios/src/MGLAPIClient.h
+++ b/platform/ios/src/MGLAPIClient.h
@@ -5,6 +5,7 @@
NS_ASSUME_NONNULL_BEGIN
+MGL_EXTERN
@interface MGLAPIClient : NSObject <NSURLSessionDelegate>
- (void)postEvents:(NS_ARRAY_OF(MGLMapboxEventAttributes *) *)events completionHandler:(nullable void (^)(NSError * _Nullable error))completionHandler;
diff --git a/platform/ios/src/MGLAnnotationContainerView.h b/platform/ios/src/MGLAnnotationContainerView.h
index 90d2964831..1e2200fbf9 100644
--- a/platform/ios/src/MGLAnnotationContainerView.h
+++ b/platform/ios/src/MGLAnnotationContainerView.h
@@ -6,6 +6,7 @@
NS_ASSUME_NONNULL_BEGIN
+MGL_EXTERN
@interface MGLAnnotationContainerView : UIView
+ (instancetype)annotationContainerViewWithAnnotationContainerView:(MGLAnnotationContainerView *)annotationContainerView;
diff --git a/platform/ios/src/MGLAnnotationImage.h b/platform/ios/src/MGLAnnotationImage.h
index a7003d7f91..4ea547fb0a 100644
--- a/platform/ios/src/MGLAnnotationImage.h
+++ b/platform/ios/src/MGLAnnotationImage.h
@@ -1,5 +1,7 @@
#import <UIKit/UIKit.h>
+#import "MGLTypes.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_EXTERN
@interface MGLAnnotationImage : NSObject
#pragma mark Initializing and Preparing the Image Object
diff --git a/platform/ios/src/MGLAnnotationView.h b/platform/ios/src/MGLAnnotationView.h
index 634e9ad723..79ca979ad1 100644
--- a/platform/ios/src/MGLAnnotationView.h
+++ b/platform/ios/src/MGLAnnotationView.h
@@ -1,5 +1,7 @@
#import <UIKit/UIKit.h>
+#import "MGLTypes.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_EXTERN
@interface MGLAnnotationView : UIView
#pragma mark Initializing and Preparing the View
diff --git a/platform/ios/src/MGLCompactCalloutView.h b/platform/ios/src/MGLCompactCalloutView.h
index 56c48a99e5..f338a8acc1 100644
--- a/platform/ios/src/MGLCompactCalloutView.h
+++ b/platform/ios/src/MGLCompactCalloutView.h
@@ -1,5 +1,6 @@
#import "SMCalloutView.h"
#import "MGLCalloutView.h"
+#import "MGLTypes.h"
/**
A concrete implementation of `MGLCalloutView` based on
@@ -7,6 +8,7 @@
callout view displays the represented annotation’s title, subtitle, and
accessory views in a compact, two-line layout.
*/
+MGL_EXTERN
@interface MGLCompactCalloutView : SMCalloutView <MGLCalloutView>
+ (instancetype)platformCalloutView;
diff --git a/platform/ios/src/MGLFaux3DUserLocationAnnotationView.h b/platform/ios/src/MGLFaux3DUserLocationAnnotationView.h
index c48dd6b27b..8614eeb985 100644
--- a/platform/ios/src/MGLFaux3DUserLocationAnnotationView.h
+++ b/platform/ios/src/MGLFaux3DUserLocationAnnotationView.h
@@ -1,6 +1,7 @@
#import <UIKit/UIKit.h>
#import "MGLUserLocationAnnotationView.h"
+MGL_EXTERN
@interface MGLFaux3DUserLocationAnnotationView : MGLUserLocationAnnotationView
@end
diff --git a/platform/ios/src/MGLLocationManager.h b/platform/ios/src/MGLLocationManager.h
index ea23801813..e2101c8885 100644
--- a/platform/ios/src/MGLLocationManager.h
+++ b/platform/ios/src/MGLLocationManager.h
@@ -1,8 +1,10 @@
-#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
+#import "MGLTypes.h"
+
@protocol MGLLocationManagerDelegate;
+MGL_EXTERN
@interface MGLLocationManager : NSObject <CLLocationManagerDelegate>
@property (nonatomic, weak) id<MGLLocationManagerDelegate> delegate;
diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h
index e467495a4a..1ae9ed121e 100644
--- a/platform/ios/src/MGLMapView.h
+++ b/platform/ios/src/MGLMapView.h
@@ -77,6 +77,7 @@ typedef NS_ENUM(NSUInteger, MGLAnnotationVerticalAlignment) {
ensuring that your use adheres to the relevant terms of use.
*/
IB_DESIGNABLE
+MGL_EXTERN
@interface MGLMapView : UIView
#pragma mark Creating Instances
diff --git a/platform/ios/src/MGLMapboxEvents.h b/platform/ios/src/MGLMapboxEvents.h
index 98f59ffd3f..5211e535c4 100644
--- a/platform/ios/src/MGLMapboxEvents.h
+++ b/platform/ios/src/MGLMapboxEvents.h
@@ -30,6 +30,7 @@ extern NSString *const MGLEventGesturePitchStart;
typedef NS_DICTIONARY_OF(NSString *, id) MGLMapboxEventAttributes;
typedef NS_MUTABLE_DICTIONARY_OF(NSString *, id) MGLMutableMapboxEventAttributes;
+MGL_EXTERN
@interface MGLMapboxEvents : NSObject
+ (nullable instancetype)sharedManager;
diff --git a/platform/ios/src/MGLUserLocation.h b/platform/ios/src/MGLUserLocation.h
index f2243815cf..68917fc44b 100644
--- a/platform/ios/src/MGLUserLocation.h
+++ b/platform/ios/src/MGLUserLocation.h
@@ -1,6 +1,6 @@
-#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
+#import "MGLTypes.h"
#import "MGLAnnotation.h"
NS_ASSUME_NONNULL_BEGIN
@@ -11,6 +11,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_EXTERN
@interface MGLUserLocation : NSObject <MGLAnnotation>
#pragma mark Determining the User’s Position
diff --git a/platform/ios/src/MGLUserLocationAnnotationView.h b/platform/ios/src/MGLUserLocationAnnotationView.h
index bef18e9544..2fe2c0b60a 100644
--- a/platform/ios/src/MGLUserLocationAnnotationView.h
+++ b/platform/ios/src/MGLUserLocationAnnotationView.h
@@ -9,6 +9,7 @@ NS_ASSUME_NONNULL_BEGIN
@class MGLUserLocation;
/** View representing an `MGLUserLocation` on screen. */
+MGL_EXTERN
@interface MGLUserLocationAnnotationView : MGLAnnotationView
/**
diff --git a/platform/ios/uitest/ios-tests.xcodeproj/project.pbxproj b/platform/ios/uitest/ios-tests.xcodeproj/project.pbxproj
index 0d6f89234d..37f7c30583 100644
--- a/platform/ios/uitest/ios-tests.xcodeproj/project.pbxproj
+++ b/platform/ios/uitest/ios-tests.xcodeproj/project.pbxproj
@@ -382,6 +382,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
+ ENABLE_BITCODE = NO;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
diff --git a/platform/macos/macos.xcodeproj/project.pbxproj b/platform/macos/macos.xcodeproj/project.pbxproj
index 8528ed0be9..182e490925 100644
--- a/platform/macos/macos.xcodeproj/project.pbxproj
+++ b/platform/macos/macos.xcodeproj/project.pbxproj
@@ -1389,6 +1389,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
+ GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
diff --git a/platform/macos/src/MGLAnnotationImage.h b/platform/macos/src/MGLAnnotationImage.h
index 37d43d7277..c894b07287 100644
--- a/platform/macos/src/MGLAnnotationImage.h
+++ b/platform/macos/src/MGLAnnotationImage.h
@@ -8,6 +8,7 @@ NS_ASSUME_NONNULL_BEGIN
`NSImage` objects with annotation-related metadata. They may be recycled later
and put into a reuse queue that is maintained by the map view.
*/
+MGL_EXTERN
@interface MGLAnnotationImage : NSObject
#pragma mark Initializing and Preparing the Image Object
diff --git a/platform/macos/src/MGLAttributionButton.h b/platform/macos/src/MGLAttributionButton.h
index 9ff3137849..5382fc605a 100644
--- a/platform/macos/src/MGLAttributionButton.h
+++ b/platform/macos/src/MGLAttributionButton.h
@@ -1,6 +1,9 @@
#import <Cocoa/Cocoa.h>
+#import "MGLTypes.h"
+
/// Button that looks like a hyperlink and opens a URL.
+MGL_EXTERN
@interface MGLAttributionButton : NSButton
/// Returns an `MGLAttributionButton` instance with the given title and URL.
diff --git a/platform/macos/src/MGLCompassCell.h b/platform/macos/src/MGLCompassCell.h
index 5ed70dcb06..5c352eadfb 100644
--- a/platform/macos/src/MGLCompassCell.h
+++ b/platform/macos/src/MGLCompassCell.h
@@ -1,5 +1,8 @@
#import <Cocoa/Cocoa.h>
+#import "MGLTypes.h"
+
/// Circular slider with an arrow pointing north.
+MGL_EXTERN
@interface MGLCompassCell : NSSliderCell
@end
diff --git a/platform/macos/src/MGLMapView.h b/platform/macos/src/MGLMapView.h
index 3dbbbe3d82..ae64977742 100644
--- a/platform/macos/src/MGLMapView.h
+++ b/platform/macos/src/MGLMapView.h
@@ -48,6 +48,7 @@ NS_ASSUME_NONNULL_BEGIN
ensuring that your use adheres to the relevant terms of use.
*/
IB_DESIGNABLE
+MGL_EXTERN
@interface MGLMapView : NSView
#pragma mark Creating Instances
diff --git a/platform/macos/src/MGLOpenGLLayer.h b/platform/macos/src/MGLOpenGLLayer.h
index 832664f397..693853afb8 100644
--- a/platform/macos/src/MGLOpenGLLayer.h
+++ b/platform/macos/src/MGLOpenGLLayer.h
@@ -1,9 +1,12 @@
#import <Cocoa/Cocoa.h>
+#import "MGLTypes.h"
+
NS_ASSUME_NONNULL_BEGIN
/// A subclass of NSOpenGLLayer that creates the environment mbgl needs to
/// render good-looking maps.
+MGL_EXTERN
@interface MGLOpenGLLayer : NSOpenGLLayer
@end