summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLTypes.h
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-10-22 15:12:35 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-11-02 12:40:40 -0700
commitc2e37f062be6848a73eb5659f253775aa0abfe02 (patch)
treee3fafb0cc1e9618249b98ff76d67077c416be19c /platform/darwin/src/MGLTypes.h
parent14663a5185ef25c6ea9592f6e9c425a3890f4c92 (diff)
downloadqtlocation-mapboxgl-c2e37f062be6848a73eb5659f253775aa0abfe02.tar.gz
[ios, macos] Adopted string enumerations
Notification names and user info keys posted by MGLOfflineStorage, as well as MGLErrorDomain, are instances of string enumerations for ease of use in Swift. Added some shims for projects built with Xcode 7.x. Fixes #6791.
Diffstat (limited to 'platform/darwin/src/MGLTypes.h')
-rw-r--r--platform/darwin/src/MGLTypes.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/platform/darwin/src/MGLTypes.h b/platform/darwin/src/MGLTypes.h
index a3ea587add..a1367e2d61 100644
--- a/platform/darwin/src/MGLTypes.h
+++ b/platform/darwin/src/MGLTypes.h
@@ -21,7 +21,7 @@
NS_ASSUME_NONNULL_BEGIN
/** Indicates an error occurred in the Mapbox SDK. */
-extern NSString * const MGLErrorDomain;
+extern NSErrorDomain const MGLErrorDomain;
/** Error constants for the Mapbox SDK. */
typedef NS_ENUM(NSInteger, MGLErrorCode) {
@@ -97,3 +97,9 @@ NS_ASSUME_NONNULL_END
#define NS_MUTABLE_DICTIONARY_OF(ObjectClass...) NSMutableDictionary
#endif
#endif
+
+#if !defined(FOUNDATION_SWIFT_SDK_EPOCH_AT_LEAST) || !FOUNDATION_SWIFT_SDK_EPOCH_AT_LEAST(8)
+ #define NS_STRING_ENUM
+ #define NS_EXTENSIBLE_STRING_ENUM
+ #define NSNotificationName NSString *
+#endif