summaryrefslogtreecommitdiff
path: root/platform/darwin
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-01-03 15:56:55 +0100
committerKonstantin Käfer <mail@kkaefer.com>2017-01-04 23:06:22 +0100
commit8bbf4c3be9ba6589dc0f7e5bf072cf68a57107b4 (patch)
tree0c46dc77841ccbce9e6f3e7285b6f525f07b69d1 /platform/darwin
parentb35deb85bc6042380ae0e7154d02faef595cfcf7 (diff)
downloadqtlocation-mapboxgl-8bbf4c3be9ba6589dc0f7e5bf072cf68a57107b4.tar.gz
[build] add -fvisibility=hidden to macOS dynamic framework and export required symbols
Diffstat (limited to 'platform/darwin')
-rw-r--r--platform/darwin/src/MGLAccountManager.h3
-rw-r--r--platform/darwin/src/MGLAttributionInfo.h2
-rw-r--r--platform/darwin/src/MGLBackgroundStyleLayer.h2
-rw-r--r--platform/darwin/src/MGLCircleStyleLayer.h2
-rw-r--r--platform/darwin/src/MGLClockDirectionFormatter.h3
-rw-r--r--platform/darwin/src/MGLCompassDirectionFormatter.h3
-rw-r--r--platform/darwin/src/MGLCoordinateFormatter.h3
-rw-r--r--platform/darwin/src/MGLFeature.h8
-rw-r--r--platform/darwin/src/MGLFeature_Private.h2
-rw-r--r--platform/darwin/src/MGLFillStyleLayer.h2
-rw-r--r--platform/darwin/src/MGLForegroundStyleLayer.h2
-rw-r--r--platform/darwin/src/MGLFoundation.h5
-rw-r--r--platform/darwin/src/MGLGeometry.h4
-rw-r--r--platform/darwin/src/MGLGeometry.mm4
-rw-r--r--platform/darwin/src/MGLLineStyleLayer.h2
-rw-r--r--platform/darwin/src/MGLMapCamera.h3
-rw-r--r--platform/darwin/src/MGLMultiPoint.h2
-rw-r--r--platform/darwin/src/MGLOfflinePack.h2
-rw-r--r--platform/darwin/src/MGLOfflineStorage.h24
-rw-r--r--platform/darwin/src/MGLOpenGLStyleLayer.h2
-rw-r--r--platform/darwin/src/MGLPointAnnotation.h2
-rw-r--r--platform/darwin/src/MGLPointCollection.h2
-rw-r--r--platform/darwin/src/MGLPolygon.h3
-rw-r--r--platform/darwin/src/MGLPolyline.h3
-rw-r--r--platform/darwin/src/MGLRasterSource.h8
-rw-r--r--platform/darwin/src/MGLRasterStyleLayer.h2
-rw-r--r--platform/darwin/src/MGLShape.h2
-rw-r--r--platform/darwin/src/MGLShapeCollection.h2
-rw-r--r--platform/darwin/src/MGLShapeSource.h14
-rw-r--r--platform/darwin/src/MGLShapeSource_Private.h3
-rw-r--r--platform/darwin/src/MGLSource.h3
-rw-r--r--platform/darwin/src/MGLStyle.h4
-rw-r--r--platform/darwin/src/MGLStyleLayer.h2
-rw-r--r--platform/darwin/src/MGLStyleLayer.h.ejs2
-rw-r--r--platform/darwin/src/MGLStyleValue.h5
-rw-r--r--platform/darwin/src/MGLSymbolStyleLayer.h2
-rw-r--r--platform/darwin/src/MGLTilePyramidOfflineRegion.h2
-rw-r--r--platform/darwin/src/MGLTileSource.h16
-rw-r--r--platform/darwin/src/MGLTileSource_Private.h6
-rw-r--r--platform/darwin/src/MGLTypes.h4
-rw-r--r--platform/darwin/src/MGLVectorSource.h2
-rw-r--r--platform/darwin/src/MGLVectorStyleLayer.h2
-rw-r--r--platform/darwin/test/MGLVersionNumber.m15
43 files changed, 153 insertions, 33 deletions
diff --git a/platform/darwin/src/MGLAccountManager.h b/platform/darwin/src/MGLAccountManager.h
index fe602aa210..c1aebd879c 100644
--- a/platform/darwin/src/MGLAccountManager.h
+++ b/platform/darwin/src/MGLAccountManager.h
@@ -1,11 +1,14 @@
#import <Foundation/Foundation.h>
+#import "MGLFoundation.h"
+
NS_ASSUME_NONNULL_BEGIN
/**
The MGLAccountManager object provides a global way to set a Mapbox API access
token.
*/
+MGL_EXPORT
@interface MGLAccountManager : NSObject
#pragma mark Authorizing Access
diff --git a/platform/darwin/src/MGLAttributionInfo.h b/platform/darwin/src/MGLAttributionInfo.h
index 7395e3f346..28b4fe50e6 100644
--- a/platform/darwin/src/MGLAttributionInfo.h
+++ b/platform/darwin/src/MGLAttributionInfo.h
@@ -2,6 +2,7 @@
#import <CoreGraphics/CoreGraphics.h>
#import <CoreLocation/CoreLocation.h>
+#import "MGLFoundation.h"
#import "MGLTypes.h"
NS_ASSUME_NONNULL_BEGIN
@@ -10,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
Information about an attribution statement, usually a copyright or trademark
statement, associated with a map content source.
*/
+MGL_EXPORT
@interface MGLAttributionInfo : NSObject
/**
diff --git a/platform/darwin/src/MGLBackgroundStyleLayer.h b/platform/darwin/src/MGLBackgroundStyleLayer.h
index 656e104bbb..e0773d14d9 100644
--- a/platform/darwin/src/MGLBackgroundStyleLayer.h
+++ b/platform/darwin/src/MGLBackgroundStyleLayer.h
@@ -1,6 +1,7 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
+#import "MGLFoundation.h"
#import "MGLStyleValue.h"
#import "MGLStyleLayer.h"
@@ -12,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
`style` and obtain the background layer using the `-[MGLStyle layerWithIdentifier:]`
method and passing `background` for the identifier.
*/
+MGL_EXPORT
@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 8c95b72123..17ac3e5881 100644
--- a/platform/darwin/src/MGLCircleStyleLayer.h
+++ b/platform/darwin/src/MGLCircleStyleLayer.h
@@ -1,6 +1,7 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
+#import "MGLFoundation.h"
#import "MGLStyleValue.h"
#import "MGLVectorStyleLayer.h"
@@ -44,6 +45,7 @@ typedef NS_ENUM(NSUInteger, MGLCircleTranslateAnchor) {
`MGLMapView` for its `style` and obtain existing layers using the
`-[MGLStyle layerWithIdentifier:]` method.
*/
+MGL_EXPORT
@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..a428f51c63 100644
--- a/platform/darwin/src/MGLClockDirectionFormatter.h
+++ b/platform/darwin/src/MGLClockDirectionFormatter.h
@@ -1,6 +1,8 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
+#import "MGLFoundation.h"
+
NS_ASSUME_NONNULL_BEGIN
/**
@@ -14,6 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
irrespective of the user’s orientation, use `MGLCompassDirectionFormatter`
instead.
*/
+MGL_EXPORT
@interface MGLClockDirectionFormatter : NSFormatter
/**
diff --git a/platform/darwin/src/MGLCompassDirectionFormatter.h b/platform/darwin/src/MGLCompassDirectionFormatter.h
index fde26ba42a..714e1cc035 100644
--- a/platform/darwin/src/MGLCompassDirectionFormatter.h
+++ b/platform/darwin/src/MGLCompassDirectionFormatter.h
@@ -1,6 +1,8 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
+#import "MGLFoundation.h"
+
NS_ASSUME_NONNULL_BEGIN
/**
@@ -12,6 +14,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_EXPORT
@interface MGLCompassDirectionFormatter : NSFormatter
/**
diff --git a/platform/darwin/src/MGLCoordinateFormatter.h b/platform/darwin/src/MGLCoordinateFormatter.h
index 909c1e8935..c42c196d5a 100644
--- a/platform/darwin/src/MGLCoordinateFormatter.h
+++ b/platform/darwin/src/MGLCoordinateFormatter.h
@@ -1,6 +1,8 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
+#import "MGLFoundation.h"
+
NS_ASSUME_NONNULL_BEGIN
/**
@@ -8,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN
geographic coordinate pairs. Use this class to create localized coordinate
strings when displaying location information to users.
*/
+MGL_EXPORT
@interface MGLCoordinateFormatter : NSFormatter
/**
diff --git a/platform/darwin/src/MGLFeature.h b/platform/darwin/src/MGLFeature.h
index ed4ff627b9..b3a1868ed2 100644
--- a/platform/darwin/src/MGLFeature.h
+++ b/platform/darwin/src/MGLFeature.h
@@ -1,5 +1,6 @@
#import <Foundation/Foundation.h>
+#import "MGLFoundation.h"
#import "MGLPolyline.h"
#import "MGLPolygon.h"
#import "MGLPointAnnotation.h"
@@ -117,6 +118,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_EXPORT
@interface MGLPointFeature : MGLPointAnnotation <MGLFeature>
@end
@@ -124,6 +126,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_EXPORT
@interface MGLPolylineFeature : MGLPolyline <MGLFeature>
@end
@@ -131,6 +134,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_EXPORT
@interface MGLPolygonFeature : MGLPolygon <MGLFeature>
@end
@@ -138,6 +142,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_EXPORT
@interface MGLPointCollectionFeature : MGLPointCollection <MGLFeature>
@end
@@ -145,6 +150,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_EXPORT
@interface MGLMultiPolylineFeature : MGLMultiPolyline <MGLFeature>
@end
@@ -152,6 +158,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_EXPORT
@interface MGLMultiPolygonFeature : MGLMultiPolygon <MGLFeature>
@end
@@ -159,6 +166,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_EXPORT
@interface MGLShapeCollectionFeature : MGLShapeCollection <MGLFeature>
@property (nonatomic, copy, readonly) NS_ARRAY_OF(MGLShape<MGLFeature> *) *shapes;
diff --git a/platform/darwin/src/MGLFeature_Private.h b/platform/darwin/src/MGLFeature_Private.h
index 97af509893..59c5ab8611 100644
--- a/platform/darwin/src/MGLFeature_Private.h
+++ b/platform/darwin/src/MGLFeature_Private.h
@@ -1,3 +1,4 @@
+#import "MGLFoundation.h"
#import "MGLFeature.h"
#import "MGLShape.h"
@@ -11,6 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
Returns an array of `MGLFeature` objects converted from the given vector of
vector tile features.
*/
+MGL_EXPORT
NS_ARRAY_OF(MGLShape <MGLFeature> *) *MGLFeaturesFromMBGLFeatures(const std::vector<mbgl::Feature> &features);
/**
diff --git a/platform/darwin/src/MGLFillStyleLayer.h b/platform/darwin/src/MGLFillStyleLayer.h
index cf8c18b5c2..c586ce413b 100644
--- a/platform/darwin/src/MGLFillStyleLayer.h
+++ b/platform/darwin/src/MGLFillStyleLayer.h
@@ -1,6 +1,7 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
+#import "MGLFoundation.h"
#import "MGLStyleValue.h"
#import "MGLVectorStyleLayer.h"
@@ -28,6 +29,7 @@ typedef NS_ENUM(NSUInteger, MGLFillTranslateAnchor) {
`MGLMapView` for its `style` and obtain existing layers using the
`-[MGLStyle layerWithIdentifier:]` method.
*/
+MGL_EXPORT
@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..474e1f6307 100644
--- a/platform/darwin/src/MGLForegroundStyleLayer.h
+++ b/platform/darwin/src/MGLForegroundStyleLayer.h
@@ -1,5 +1,6 @@
#import <Foundation/Foundation.h>
+#import "MGLFoundation.h"
#import "MGLStyleLayer.h"
NS_ASSUME_NONNULL_BEGIN
@@ -14,6 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
subclasses of this class. Instead, create instances of `MGLRasterStyleLayer`
and the concrete subclasses of `MGLVectorStyleLayer`.
*/
+MGL_EXPORT
@interface MGLForegroundStyleLayer : MGLStyleLayer
#pragma mark Initializing a Style Layer
diff --git a/platform/darwin/src/MGLFoundation.h b/platform/darwin/src/MGLFoundation.h
new file mode 100644
index 0000000000..3400c63979
--- /dev/null
+++ b/platform/darwin/src/MGLFoundation.h
@@ -0,0 +1,5 @@
+#pragma once
+
+#import <Foundation/Foundation.h>
+
+#define MGL_EXPORT __attribute__((visibility ("default")))
diff --git a/platform/darwin/src/MGLGeometry.h b/platform/darwin/src/MGLGeometry.h
index 8e36b86d96..408bdb2632 100644
--- a/platform/darwin/src/MGLGeometry.h
+++ b/platform/darwin/src/MGLGeometry.h
@@ -2,6 +2,8 @@
#import <CoreLocation/CoreLocation.h>
#import <CoreGraphics/CGBase.h>
+#import "MGLFoundation.h"
+
NS_ASSUME_NONNULL_BEGIN
/** Defines the area spanned by an `MGLCoordinateBounds`. */
@@ -33,7 +35,7 @@ NS_INLINE BOOL MGLCoordinateSpanEqualToCoordinateSpan(MGLCoordinateSpan span1, M
}
/** An area of zero width and zero height. */
-extern const MGLCoordinateSpan MGLCoordinateSpanZero;
+extern MGL_EXPORT const MGLCoordinateSpan MGLCoordinateSpanZero;
/** A rectangular area as measured on a two-dimensional map projection. */
typedef struct MGLCoordinateBounds {
diff --git a/platform/darwin/src/MGLGeometry.mm b/platform/darwin/src/MGLGeometry.mm
index 57922e30b9..36e096dd03 100644
--- a/platform/darwin/src/MGLGeometry.mm
+++ b/platform/darwin/src/MGLGeometry.mm
@@ -1,5 +1,7 @@
#import "MGLGeometry_Private.h"
+#import "MGLFoundation.h"
+
#import <mbgl/util/projection.hpp>
/** Vertical field of view, measured in degrees, for determining the altitude
@@ -30,6 +32,7 @@ CGRect MGLExtendRect(CGRect rect, CGPoint point) {
return rect;
}
+MGL_EXPORT
CLLocationDistance MGLAltitudeForZoomLevel(double zoomLevel, CGFloat pitch, CLLocationDegrees latitude, CGSize size) {
CLLocationDistance metersPerPixel = mbgl::Projection::getMetersPerPixelAtLatitude(latitude, zoomLevel);
CLLocationDistance metersTall = metersPerPixel * size.height;
@@ -37,6 +40,7 @@ CLLocationDistance MGLAltitudeForZoomLevel(double zoomLevel, CGFloat pitch, CLLo
return altitude * std::sin(M_PI_2 - MGLRadiansFromDegrees(pitch)) / std::sin(M_PI_2);
}
+MGL_EXPORT
double MGLZoomLevelForAltitude(CLLocationDistance altitude, CGFloat pitch, CLLocationDegrees latitude, CGSize size) {
CLLocationDistance eyeAltitude = altitude / std::sin(M_PI_2 - MGLRadiansFromDegrees(pitch)) * std::sin(M_PI_2);
CLLocationDistance metersTall = eyeAltitude * 2 * std::tan(MGLRadiansFromDegrees(MGLAngularFieldOfView) / 2.);
diff --git a/platform/darwin/src/MGLLineStyleLayer.h b/platform/darwin/src/MGLLineStyleLayer.h
index c47c7d5166..6df0d38088 100644
--- a/platform/darwin/src/MGLLineStyleLayer.h
+++ b/platform/darwin/src/MGLLineStyleLayer.h
@@ -1,6 +1,7 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
+#import "MGLFoundation.h"
#import "MGLStyleValue.h"
#import "MGLVectorStyleLayer.h"
@@ -68,6 +69,7 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslateAnchor) {
`MGLMapView` for its `style` and obtain existing layers using the
`-[MGLStyle layerWithIdentifier:]` method.
*/
+MGL_EXPORT
@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..3d492656af 100644
--- a/platform/darwin/src/MGLMapCamera.h
+++ b/platform/darwin/src/MGLMapCamera.h
@@ -2,12 +2,15 @@
#import <CoreGraphics/CoreGraphics.h>
#import <CoreLocation/CoreLocation.h>
+#import "MGLFoundation.h"
+
NS_ASSUME_NONNULL_BEGIN
/**
An `MGLMapCamera` object represents a viewpoint from which the user observes
some point on an `MGLMapView`.
*/
+MGL_EXPORT
@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 ed40ee9cad..eaac50af46 100644
--- a/platform/darwin/src/MGLMultiPoint.h
+++ b/platform/darwin/src/MGLMultiPoint.h
@@ -1,6 +1,7 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
+#import "MGLFoundation.h"
#import "MGLShape.h"
NS_ASSUME_NONNULL_BEGIN
@@ -12,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
`MGLPolygon` classes. However, you can use the method and properties of this
class to access information about the vertices of the line or polygon.
*/
+MGL_EXPORT
@interface MGLMultiPoint : MGLShape
/**
diff --git a/platform/darwin/src/MGLOfflinePack.h b/platform/darwin/src/MGLOfflinePack.h
index a14d001d0f..de76228ff0 100644
--- a/platform/darwin/src/MGLOfflinePack.h
+++ b/platform/darwin/src/MGLOfflinePack.h
@@ -1,5 +1,6 @@
#import <Foundation/Foundation.h>
+#import "MGLFoundation.h"
#import "MGLOfflineRegion.h"
NS_ASSUME_NONNULL_BEGIN
@@ -100,6 +101,7 @@ typedef struct MGLOfflinePackProgress {
`+[MGLOfflineStorage addPackForRegion:withContext:completionHandler:]` method.
A pack created using `-[MGLOfflinePack init]` is immediately invalid.
*/
+MGL_EXPORT
@interface MGLOfflinePack : NSObject
/**
diff --git a/platform/darwin/src/MGLOfflineStorage.h b/platform/darwin/src/MGLOfflineStorage.h
index b3fb7a2d54..9557258b41 100644
--- a/platform/darwin/src/MGLOfflineStorage.h
+++ b/platform/darwin/src/MGLOfflineStorage.h
@@ -1,5 +1,6 @@
#import <Foundation/Foundation.h>
+#import "MGLFoundation.h"
#import "MGLTypes.h"
NS_ASSUME_NONNULL_BEGIN
@@ -24,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
alternatively observe KVO change notifications to the pack’s `progress` key
path.
*/
-extern const NSNotificationName MGLOfflinePackProgressChangedNotification;
+extern MGL_EXPORT const NSNotificationName MGLOfflinePackProgressChangedNotification;
/**
Posted by the shared `MGLOfflineStorage` object whenever an `MGLOfflinePack`
@@ -37,7 +38,7 @@ extern const NSNotificationName MGLOfflinePackProgressChangedNotification;
`userInfo` dictionary contains the error object in the
`MGLOfflinePackErrorUserInfoKey` key.
*/
-extern const NSNotificationName MGLOfflinePackErrorNotification;
+extern MGL_EXPORT const NSNotificationName MGLOfflinePackErrorNotification;
/**
Posted by the shared `MGLOfflineStorage` object when the maximum number of
@@ -52,7 +53,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;
+extern MGL_EXPORT const NSNotificationName MGLOfflinePackMaximumMapboxTilesReachedNotification;
/**
A key in the `userInfo` property of a notification posted by `MGLOfflinePack`.
@@ -65,9 +66,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;
+extern MGL_EXPORT const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyState;
-extern NSString * const MGLOfflinePackStateUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyState")));
+extern MGL_EXPORT NSString * const MGLOfflinePackStateUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyState")));
/**
The key for an `NSValue` object that indicates an offline pack’s current
@@ -76,9 +77,9 @@ extern NSString * const MGLOfflinePackStateUserInfoKey __attribute__((deprecated
`-MGLOfflinePackProgressValue` on the object to receive the
`MGLOfflinePackProgress`-typed progress.
*/
-extern const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyProgress;
+extern MGL_EXPORT const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyProgress;
-extern NSString * const MGLOfflinePackProgressUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyProgress")));
+extern MGL_EXPORT NSString * const MGLOfflinePackProgressUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyProgress")));
/**
The key for an `NSError` object that is encountered in the course of
@@ -86,9 +87,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;
+extern MGL_EXPORT const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyError;
-extern NSString * const MGLOfflinePackErrorUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyError")));
+extern MGL_EXPORT NSString * const MGLOfflinePackErrorUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyError")));
/**
The key for an `NSNumber` object that indicates the maximum number of
@@ -98,9 +99,9 @@ extern NSString * const MGLOfflinePackErrorUserInfoKey __attribute__((deprecated
`-unsignedLongLongValue` on the object to receive the `uint64_t`-typed tile
limit.
*/
-extern const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyMaximumCount;
+extern MGL_EXPORT const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyMaximumCount;
-extern NSString * const MGLOfflinePackMaximumCountUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyMaximumCount")));
+extern MGL_EXPORT NSString * const MGLOfflinePackMaximumCountUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyMaximumCount")));
/**
A block to be called once an offline pack has been completely created and
@@ -135,6 +136,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_EXPORT
@interface MGLOfflineStorage : NSObject
/**
diff --git a/platform/darwin/src/MGLOpenGLStyleLayer.h b/platform/darwin/src/MGLOpenGLStyleLayer.h
index 8fbbd91854..de4fc92b17 100644
--- a/platform/darwin/src/MGLOpenGLStyleLayer.h
+++ b/platform/darwin/src/MGLOpenGLStyleLayer.h
@@ -1,6 +1,7 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
+#import "MGLFoundation.h"
#import "MGLStyleValue.h"
#import "MGLStyleLayer.h"
@@ -17,6 +18,7 @@ typedef struct MGLStyleLayerDrawingContext {
CGFloat fieldOfView;
} MGLStyleLayerDrawingContext;
+MGL_EXPORT
@interface MGLOpenGLStyleLayer : MGLStyleLayer
@property (nonatomic, weak, readonly) MGLMapView *mapView;
diff --git a/platform/darwin/src/MGLPointAnnotation.h b/platform/darwin/src/MGLPointAnnotation.h
index b552912f97..6b2e1dd43a 100644
--- a/platform/darwin/src/MGLPointAnnotation.h
+++ b/platform/darwin/src/MGLPointAnnotation.h
@@ -1,6 +1,7 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
+#import "MGLFoundation.h"
#import "MGLShape.h"
NS_ASSUME_NONNULL_BEGIN
@@ -11,6 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
situations where all you want to do is associate a point on the map with a
title.
*/
+MGL_EXPORT
@interface MGLPointAnnotation : MGLShape
/**
diff --git a/platform/darwin/src/MGLPointCollection.h b/platform/darwin/src/MGLPointCollection.h
index 95af9dae5e..e090c60b10 100644
--- a/platform/darwin/src/MGLPointCollection.h
+++ b/platform/darwin/src/MGLPointCollection.h
@@ -1,6 +1,7 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
+#import "MGLFoundation.h"
#import "MGLOverlay.h"
#import "MGLShape.h"
@@ -15,6 +16,7 @@
to the map view's style, the point collection represents as a group of distinct
annotations.
*/
+MGL_EXPORT
@interface MGLPointCollection : MGLShape <MGLOverlay>
/**
diff --git a/platform/darwin/src/MGLPolygon.h b/platform/darwin/src/MGLPolygon.h
index b9ec6b8399..57402326d5 100644
--- a/platform/darwin/src/MGLPolygon.h
+++ b/platform/darwin/src/MGLPolygon.h
@@ -1,6 +1,7 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
+#import "MGLFoundation.h"
#import "MGLMultiPoint.h"
#import "MGLOverlay.h"
@@ -14,6 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
are provided. The first and last points are connected to each other to create
the closed shape.
*/
+MGL_EXPORT
@interface MGLPolygon : MGLMultiPoint <MGLOverlay>
/**
@@ -64,6 +66,7 @@ NS_ASSUME_NONNULL_BEGIN
@note `MGLMultiPolygon` objects cannot be added to a map view using
`-[MGLMapView addAnnotations:]` and related methods.
*/
+MGL_EXPORT
@interface MGLMultiPolygon : MGLShape <MGLOverlay>
/**
diff --git a/platform/darwin/src/MGLPolyline.h b/platform/darwin/src/MGLPolyline.h
index cb98df9a1b..dfc471bae9 100644
--- a/platform/darwin/src/MGLPolyline.h
+++ b/platform/darwin/src/MGLPolyline.h
@@ -1,6 +1,7 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
+#import "MGLFoundation.h"
#import "MGLMultiPoint.h"
#import "MGLOverlay.h"
@@ -14,6 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
the order they are provided. The first and last points are not connected to
each other.
*/
+MGL_EXPORT
@interface MGLPolyline : MGLMultiPoint <MGLOverlay>
/**
@@ -39,6 +41,7 @@ NS_ASSUME_NONNULL_BEGIN
@note `MGLMultiPolyline` objects cannot be added to a map view using
`-[MGLMapView addAnnotations:]` and related methods.
*/
+MGL_EXPORT
@interface MGLMultiPolyline : MGLShape <MGLOverlay>
/**
diff --git a/platform/darwin/src/MGLRasterSource.h b/platform/darwin/src/MGLRasterSource.h
index 262e8f2ce1..80b740692c 100644
--- a/platform/darwin/src/MGLRasterSource.h
+++ b/platform/darwin/src/MGLRasterSource.h
@@ -1,7 +1,8 @@
-#import "MGLTileSource.h"
-
#import <CoreGraphics/CoreGraphics.h>
+#import "MGLFoundation.h"
+#import "MGLTileSource.h"
+
NS_ASSUME_NONNULL_BEGIN
/**
@@ -18,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
This option is only applicable to `MGLRasterSource` objects; it is ignored when
initializing `MGLVectorSource` objects.
*/
-extern const MGLTileSourceOption MGLTileSourceOptionTileSize;
+extern MGL_EXPORT const MGLTileSourceOption MGLTileSourceOptionTileSize;
/**
`MGLRasterSource` is a map content source that supplies raster image tiles to
@@ -36,6 +37,7 @@ extern const MGLTileSourceOption MGLTileSourceOptionTileSize;
can also add and remove sources dynamically using methods such as
`-[MGLStyle addSource:]` and `-[MGLStyle sourceWithIdentifier:]`.
*/
+MGL_EXPORT
@interface MGLRasterSource : MGLTileSource
#pragma mark Initializing a Source
diff --git a/platform/darwin/src/MGLRasterStyleLayer.h b/platform/darwin/src/MGLRasterStyleLayer.h
index def5221d62..1bdff12466 100644
--- a/platform/darwin/src/MGLRasterStyleLayer.h
+++ b/platform/darwin/src/MGLRasterStyleLayer.h
@@ -1,6 +1,7 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
+#import "MGLFoundation.h"
#import "MGLStyleValue.h"
#import "MGLForegroundStyleLayer.h"
@@ -12,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
`MGLMapView` for its `style` and obtain existing layers using the
`-[MGLStyle layerWithIdentifier:]` method.
*/
+MGL_EXPORT
@interface MGLRasterStyleLayer : MGLForegroundStyleLayer
#pragma mark - Accessing the Paint Attributes
diff --git a/platform/darwin/src/MGLShape.h b/platform/darwin/src/MGLShape.h
index af815da0e9..cc545d783f 100644
--- a/platform/darwin/src/MGLShape.h
+++ b/platform/darwin/src/MGLShape.h
@@ -1,5 +1,6 @@
#import <Foundation/Foundation.h>
+#import "MGLFoundation.h"
#import "MGLAnnotation.h"
NS_ASSUME_NONNULL_BEGIN
@@ -11,6 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
and providing an appropriate value for the coordinate property inherited from
the `MGLAnnotation` protocol.
*/
+MGL_EXPORT
@interface MGLShape : NSObject <MGLAnnotation>
#pragma mark Creating a Shape
diff --git a/platform/darwin/src/MGLShapeCollection.h b/platform/darwin/src/MGLShapeCollection.h
index a617223ea7..dfad080de2 100644
--- a/platform/darwin/src/MGLShapeCollection.h
+++ b/platform/darwin/src/MGLShapeCollection.h
@@ -1,5 +1,6 @@
#import <Foundation/Foundation.h>
+#import "MGLFoundation.h"
#import "MGLShape.h"
#import "MGLTypes.h"
@@ -14,6 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
@note `MGLShapeCollection` objects cannot be added to a map view using
`-[MGLMapView addAnnotations:]` and related methods.
*/
+MGL_EXPORT
@interface MGLShapeCollection : MGLShape
/**
diff --git a/platform/darwin/src/MGLShapeSource.h b/platform/darwin/src/MGLShapeSource.h
index 68cb40a83f..7bd85c8d1f 100644
--- a/platform/darwin/src/MGLShapeSource.h
+++ b/platform/darwin/src/MGLShapeSource.h
@@ -1,5 +1,6 @@
#import "MGLSource.h"
+#import "MGLFoundation.h"
#import "MGLTypes.h"
#import "MGLShape.h"
@@ -17,14 +18,14 @@ typedef NSString *MGLShapeSourceOption NS_STRING_ENUM;
If the `shape` property contains point shapes, setting this option to
`YES` clusters the points by radius into groups. The default value is `NO`.
*/
-extern const MGLShapeSourceOption MGLShapeSourceOptionClustered;
+extern MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionClustered;
/**
An `NSNumber` object containing an integer; specifies the radius of each
cluster if clustering is enabled. A value of 512 produces a radius equal to
the width of a tile. The default value is 50.
*/
-extern const MGLShapeSourceOption MGLShapeSourceOptionClusterRadius;
+extern MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionClusterRadius;
/**
An `NSNumber` object containing an integer; specifies the maximum zoom level at
@@ -32,14 +33,14 @@ extern const MGLShapeSourceOption MGLShapeSourceOptionClusterRadius;
less than the value of `MGLShapeSourceOptionMaximumZoomLevel` so that, at the
maximum zoom level, the shapes are not clustered.
*/
-extern const MGLShapeSourceOption MGLShapeSourceOptionMaximumZoomLevelForClustering;
+extern MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionMaximumZoomLevelForClustering;
/**
An `NSNumber` object containing an integer; specifies the maximum zoom level at
which to create vector tiles. A greater value produces greater detail at high
zoom levels. The default value is 18.
*/
-extern const MGLShapeSourceOption MGLShapeSourceOptionMaximumZoomLevel;
+extern MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionMaximumZoomLevel;
/**
An `NSNumber` object containing an integer; specifies the size of the tile
@@ -47,14 +48,14 @@ extern const MGLShapeSourceOption MGLShapeSourceOptionMaximumZoomLevel;
buffer as wide as the tile itself. Larger values produce fewer rendering
artifacts near tile edges and slower performance. The default value is 128.
*/
-extern const MGLShapeSourceOption MGLShapeSourceOptionBuffer;
+extern MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionBuffer;
/**
An `NSNumber` object containing a double; specifies the Douglas-Peucker
simplification tolerance. A greater value produces simpler geometries and
improves performance. The default value is 0.375.
*/
-extern const MGLShapeSourceOption MGLShapeSourceOptionSimplificationTolerance;
+extern MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionSimplificationTolerance;
/**
`MGLShapeSource` is a map content source that supplies vector shapes to be
@@ -75,6 +76,7 @@ extern const MGLShapeSourceOption MGLShapeSourceOptionSimplificationTolerance;
Any vector style layer initialized with a shape source should have a `nil`
value in its `sourceLayerIdentifier` property.
*/
+MGL_EXPORT
@interface MGLShapeSource : MGLSource
#pragma mark Initializing a Source
diff --git a/platform/darwin/src/MGLShapeSource_Private.h b/platform/darwin/src/MGLShapeSource_Private.h
index 584a5a4b30..c14f4fbb59 100644
--- a/platform/darwin/src/MGLShapeSource_Private.h
+++ b/platform/darwin/src/MGLShapeSource_Private.h
@@ -1,5 +1,5 @@
+#import "MGLFoundation.h"
#import "MGLShapeSource.h"
-#import "MGLShapeSource_Private.h"
NS_ASSUME_NONNULL_BEGIN
@@ -16,6 +16,7 @@ namespace mbgl {
@end
+MGL_EXPORT
mbgl::style::GeoJSONOptions MGLGeoJSONOptionsFromDictionary(NS_DICTIONARY_OF(MGLShapeSourceOption, id) *options);
NS_ASSUME_NONNULL_END
diff --git a/platform/darwin/src/MGLSource.h b/platform/darwin/src/MGLSource.h
index 6b381fca19..550996f51b 100644
--- a/platform/darwin/src/MGLSource.h
+++ b/platform/darwin/src/MGLSource.h
@@ -1,5 +1,7 @@
#import <Foundation/Foundation.h>
+#import "MGLFoundation.h"
+
NS_ASSUME_NONNULL_BEGIN
/**
@@ -18,6 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
subclasses of this class. Instead, create instances of `MGLShapeSource` and the
concrete subclasses of `MGLTileSource`.
*/
+MGL_EXPORT
@interface MGLSource : NSObject
#pragma mark Initializing a Source
diff --git a/platform/darwin/src/MGLStyle.h b/platform/darwin/src/MGLStyle.h
index 96dd502c30..6192632e75 100644
--- a/platform/darwin/src/MGLStyle.h
+++ b/platform/darwin/src/MGLStyle.h
@@ -1,5 +1,6 @@
#import <Foundation/Foundation.h>
+#import "MGLFoundation.h"
#import "MGLStyleLayer.h"
#import "MGLTypes.h"
@@ -27,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN
the constant itself. Such details may change significantly from version to
version.
*/
-static const NSInteger MGLStyleDefaultVersion = 9;
+static MGL_EXPORT const NSInteger MGLStyleDefaultVersion = 9;
/**
The proxy object for the current map style.
@@ -45,6 +46,7 @@ static const NSInteger MGLStyleDefaultVersion = 9;
or `-mapView:didFinishLoadingStyle:` as indicators that it's safe
to modify the map's style.
*/
+MGL_EXPORT
@interface MGLStyle : NSObject
#pragma mark Accessing Default Styles
diff --git a/platform/darwin/src/MGLStyleLayer.h b/platform/darwin/src/MGLStyleLayer.h
index 4032be9297..ac40545398 100644
--- a/platform/darwin/src/MGLStyleLayer.h
+++ b/platform/darwin/src/MGLStyleLayer.h
@@ -1,5 +1,6 @@
#import <Foundation/Foundation.h>
+#import "MGLFoundation.h"
#import "MGLTypes.h"
NS_ASSUME_NONNULL_BEGIN
@@ -18,6 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
`MGLBackgroundStyleLayer` and the concrete subclasses of
`MGLForegroundStyleLayer`.
*/
+MGL_EXPORT
@interface MGLStyleLayer : NSObject
#pragma mark Initializing a Style Layer
diff --git a/platform/darwin/src/MGLStyleLayer.h.ejs b/platform/darwin/src/MGLStyleLayer.h.ejs
index 3b576e766b..7d0f6922f4 100644
--- a/platform/darwin/src/MGLStyleLayer.h.ejs
+++ b/platform/darwin/src/MGLStyleLayer.h.ejs
@@ -8,6 +8,7 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
+#import "MGLFoundation.h"
#import "MGLStyleValue.h"
#import "MGL<%-
(type === 'background' ? '' :
@@ -68,6 +69,7 @@ typedef NS_ENUM(NSUInteger, MGL<%- camelize(property.name) %>) {
`-[MGLStyle layerWithIdentifier:]` method.
*/
<% } -%>
+MGL_EXPORT
@interface MGL<%- camelize(type) %>StyleLayer : MGL<%-
(type === 'background' ? '' :
(type === 'raster' ? 'Foreground' :
diff --git a/platform/darwin/src/MGLStyleValue.h b/platform/darwin/src/MGLStyleValue.h
index ab5e76bbe3..315d48b761 100644
--- a/platform/darwin/src/MGLStyleValue.h
+++ b/platform/darwin/src/MGLStyleValue.h
@@ -1,6 +1,8 @@
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
+#import "MGLFoundation.h"
+
NS_ASSUME_NONNULL_BEGIN
/**
@@ -25,6 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
<li>`NSArray`</li>
</ul>
*/
+MGL_EXPORT
@interface MGLStyleValue<T> : NSObject
#pragma mark Creating a Style Value
@@ -68,6 +71,7 @@ NS_ASSUME_NONNULL_BEGIN
The `MGLStyleConstantValue` class takes a generic parameter `T` that indicates
the Foundation class being wrapped by this class.
*/
+MGL_EXPORT
@interface MGLStyleConstantValue<T> : MGLStyleValue<T>
#pragma mark Creating a Style Constant Value
@@ -111,6 +115,7 @@ NS_ASSUME_NONNULL_BEGIN
The `MGLStyleFunction` class takes a generic parameter `T` that indicates the
Foundation class being wrapped by this class.
*/
+MGL_EXPORT
@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 5a216e0354..57a8f71827 100644
--- a/platform/darwin/src/MGLSymbolStyleLayer.h
+++ b/platform/darwin/src/MGLSymbolStyleLayer.h
@@ -1,6 +1,7 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
+#import "MGLFoundation.h"
#import "MGLStyleValue.h"
#import "MGLVectorStyleLayer.h"
@@ -228,6 +229,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
`MGLMapView` for its `style` and obtain existing layers using the
`-[MGLStyle layerWithIdentifier:]` method.
*/
+MGL_EXPORT
@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..4c6237702d 100644
--- a/platform/darwin/src/MGLTilePyramidOfflineRegion.h
+++ b/platform/darwin/src/MGLTilePyramidOfflineRegion.h
@@ -1,5 +1,6 @@
#import <Foundation/Foundation.h>
+#import "MGLFoundation.h"
#import "MGLOfflineRegion.h"
#import "MGLGeometry.h"
@@ -9,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN
An offline region defined by a style URL, geographic coordinate bounds, and
range of zoom levels.
*/
+MGL_EXPORT
@interface MGLTilePyramidOfflineRegion : NSObject <MGLOfflineRegion, NSSecureCoding, NSCopying>
/**
diff --git a/platform/darwin/src/MGLTileSource.h b/platform/darwin/src/MGLTileSource.h
index caf915637e..7e1a8206a3 100644
--- a/platform/darwin/src/MGLTileSource.h
+++ b/platform/darwin/src/MGLTileSource.h
@@ -1,5 +1,6 @@
#import <Foundation/Foundation.h>
+#import "MGLFoundation.h"
#import "MGLSource.h"
#import "MGLTypes.h"
@@ -20,7 +21,7 @@ typedef NSString *MGLTileSourceOption NS_STRING_ENUM;
`MGLTileSourceOptionMaximumZoomLevel`, if specified. The default value for this
option is 0.
*/
-extern const MGLTileSourceOption MGLTileSourceOptionMinimumZoomLevel;
+extern MGL_EXPORT const MGLTileSourceOption MGLTileSourceOptionMinimumZoomLevel;
/**
An `NSNumber` object containing an unsigned integer that specifies the maximum
@@ -30,7 +31,7 @@ extern const MGLTileSourceOption MGLTileSourceOptionMinimumZoomLevel;
`MGLTileSourceOptionMinimumZoomLevel`, if specified. The default value for this
option is 22.
*/
-extern const MGLTileSourceOption MGLTileSourceOptionMaximumZoomLevel;
+extern MGL_EXPORT const MGLTileSourceOption MGLTileSourceOptionMaximumZoomLevel;
#if TARGET_OS_IPHONE
/**
@@ -42,7 +43,7 @@ extern const MGLTileSourceOption MGLTileSourceOptionMaximumZoomLevel;
`MGLTileSourceOptionAttributionInfos` option is specified, this option is
ignored.
*/
-extern const MGLTileSourceOption MGLTileSourceOptionAttributionHTMLString;
+extern MGL_EXPORT const MGLTileSourceOption MGLTileSourceOptionAttributionHTMLString;
/**
An array of `MGLAttributionInfo` objects defining the buttons to be displayed
@@ -51,7 +52,7 @@ extern const MGLTileSourceOption MGLTileSourceOptionAttributionHTMLString;
By default, no attribution statements are displayed.
*/
-extern const MGLTileSourceOption MGLTileSourceOptionAttributionInfos;
+extern MGL_EXPORT const MGLTileSourceOption MGLTileSourceOptionAttributionInfos;
#else
/**
An HTML string defining the buttons to be displayed in the map view’s
@@ -61,7 +62,7 @@ extern const MGLTileSourceOption MGLTileSourceOptionAttributionInfos;
`MGLTileSourceOptionAttributionInfos` option is specified, this option is
ignored.
*/
-extern const MGLTileSourceOption MGLTileSourceOptionAttributionHTMLString;
+extern MGL_EXPORT const MGLTileSourceOption MGLTileSourceOptionAttributionHTMLString;
/**
An array of `MGLAttributionInfo` objects defining the buttons to be displayed
@@ -70,7 +71,7 @@ extern const MGLTileSourceOption MGLTileSourceOptionAttributionHTMLString;
By default, no attribution statements are displayed.
*/
-extern const MGLTileSourceOption MGLTileSourceOptionAttributionInfos;
+extern MGL_EXPORT const MGLTileSourceOption MGLTileSourceOptionAttributionInfos;
#endif
/**
@@ -80,7 +81,7 @@ extern const MGLTileSourceOption MGLTileSourceOptionAttributionInfos;
The default value for this option is `MGLTileCoordinateSystemXYZ`.
*/
-extern const MGLTileSourceOption MGLTileSourceOptionTileCoordinateSystem;
+extern MGL_EXPORT const MGLTileSourceOption MGLTileSourceOptionTileCoordinateSystem;
/**
Tile coordinate systems that determine how tile coordinates in tile URLs are
@@ -119,6 +120,7 @@ typedef NS_ENUM(NSUInteger, MGLTileCoordinateSystem) {
subclasses of this class. Instead, create instances of `MGLRasterSource` and
`MGLVectorSource`.
*/
+MGL_EXPORT
@interface MGLTileSource : MGLSource
#pragma mark Initializing a Source
diff --git a/platform/darwin/src/MGLTileSource_Private.h b/platform/darwin/src/MGLTileSource_Private.h
index ca80e3d960..8da69274f2 100644
--- a/platform/darwin/src/MGLTileSource_Private.h
+++ b/platform/darwin/src/MGLTileSource_Private.h
@@ -1,7 +1,8 @@
-#import "MGLTileSource.h"
-
#import <CoreGraphics/CoreGraphics.h>
+#import "MGLFoundation.h"
+#import "MGLTileSource.h"
+
NS_ASSUME_NONNULL_BEGIN
namespace mbgl {
@@ -31,6 +32,7 @@ namespace mbgl {
@end
+MGL_EXPORT
mbgl::Tileset MGLTileSetFromTileURLTemplates(NS_ARRAY_OF(NSString *) *tileURLTemplates, NS_DICTIONARY_OF(MGLTileSourceOption, id) * _Nullable options);
NS_ASSUME_NONNULL_END
diff --git a/platform/darwin/src/MGLTypes.h b/platform/darwin/src/MGLTypes.h
index a6b7254b58..8cd2cacaa6 100644
--- a/platform/darwin/src/MGLTypes.h
+++ b/platform/darwin/src/MGLTypes.h
@@ -1,5 +1,7 @@
#import <Foundation/Foundation.h>
+#import "MGLFoundation.h"
+
#pragma once
#if TARGET_OS_IPHONE
@@ -28,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN
#endif
/** Indicates an error occurred in the Mapbox SDK. */
-extern NSErrorDomain const MGLErrorDomain;
+extern MGL_EXPORT NSErrorDomain const MGLErrorDomain;
/** Error constants for the Mapbox SDK. */
typedef NS_ENUM(NSInteger, MGLErrorCode) {
diff --git a/platform/darwin/src/MGLVectorSource.h b/platform/darwin/src/MGLVectorSource.h
index f91a0cbb23..a5fd2584f8 100644
--- a/platform/darwin/src/MGLVectorSource.h
+++ b/platform/darwin/src/MGLVectorSource.h
@@ -1,3 +1,4 @@
+#import "MGLFoundation.h"
#import "MGLTileSource.h"
NS_ASSUME_NONNULL_BEGIN
@@ -25,6 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
layer initialized with a vector source must have a non-`nil` value in its
`sourceLayerIdentifier` property.
*/
+MGL_EXPORT
@interface MGLVectorSource : MGLTileSource
- (instancetype)initWithIdentifier:(NSString *)identifier configurationURL:(NSURL *)configurationURL NS_DESIGNATED_INITIALIZER;
diff --git a/platform/darwin/src/MGLVectorStyleLayer.h b/platform/darwin/src/MGLVectorStyleLayer.h
index 1197d76807..f59ef4bf7f 100644
--- a/platform/darwin/src/MGLVectorStyleLayer.h
+++ b/platform/darwin/src/MGLVectorStyleLayer.h
@@ -1,5 +1,6 @@
#import <Foundation/Foundation.h>
+#import "MGLFoundation.h"
#import "MGLForegroundStyleLayer.h"
NS_ASSUME_NONNULL_BEGIN
@@ -13,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
subclasses: `MGLCircleStyleLayer`, `MGLFillStyleLayer`, `MGLLineStyleLayer`,
and `MGLSymbolStyleLayer`.
*/
+MGL_EXPORT
@interface MGLVectorStyleLayer : MGLForegroundStyleLayer
#pragma mark Refining a Style Layer’s Content
diff --git a/platform/darwin/test/MGLVersionNumber.m b/platform/darwin/test/MGLVersionNumber.m
new file mode 100644
index 0000000000..fae08a087d
--- /dev/null
+++ b/platform/darwin/test/MGLVersionNumber.m
@@ -0,0 +1,15 @@
+#import <Mapbox/Mapbox.h>
+
+#import <XCTest/XCTest.h>
+
+@interface MGLVersionTests : XCTestCase
+
+@end
+
+@implementation MGLVersionTests
+
+- (void)testVersionNumber {
+ XCTAssertEqual(1, MapboxVersionNumber);
+}
+
+@end