summaryrefslogtreecommitdiff
path: root/platform/darwin
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-11-04 09:49:46 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-11-04 14:02:10 -0700
commit4e8121aaf1037f2e927ba80d4da85ebe3eef5060 (patch)
treecf2db2f0a7c50c072ba2952f8561fb0cdad48e5a /platform/darwin
parent751aff2ddd1770d9842c273f65e8aad768112151 (diff)
downloadqtlocation-mapboxgl-4e8121aaf1037f2e927ba80d4da85ebe3eef5060.tar.gz
[ios, macos] Fixed Xcode 7.x compilation
Define NSErrorDomain before its first use. Define NSNotificationName as a typedef instead of a #define. Guard these shims on the existence of NS_STRING_ENUM rather than another macro that’s new to Xcode 8. Fixes #6906.
Diffstat (limited to 'platform/darwin')
-rw-r--r--platform/darwin/src/MGLTypes.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/platform/darwin/src/MGLTypes.h b/platform/darwin/src/MGLTypes.h
index e9e05bc684..a6b7254b58 100644
--- a/platform/darwin/src/MGLTypes.h
+++ b/platform/darwin/src/MGLTypes.h
@@ -20,6 +20,13 @@
NS_ASSUME_NONNULL_BEGIN
+#ifndef NS_STRING_ENUM
+ #define NS_STRING_ENUM
+ #define NS_EXTENSIBLE_STRING_ENUM
+ typedef NSString *NSErrorDomain;
+ typedef NSString *NSNotificationName;
+#endif
+
/** Indicates an error occurred in the Mapbox SDK. */
extern NSErrorDomain const MGLErrorDomain;
@@ -97,9 +104,3 @@ NS_ASSUME_NONNULL_END
#define NS_MUTABLE_DICTIONARY_OF(ObjectClass...) NSMutableDictionary
#endif
#endif
-
-#if !defined(FOUNDATION_SWIFT_SDK_EPOCH_LESS_THAN) || FOUNDATION_SWIFT_SDK_EPOCH_LESS_THAN(8)
- #define NS_STRING_ENUM
- #define NS_EXTENSIBLE_STRING_ENUM
- #define NSNotificationName NSString *
-#endif