summaryrefslogtreecommitdiff
path: root/SmartDeviceLink
diff options
context:
space:
mode:
authorMuller, Alexander (A.) <amulle19@ford.com>2016-09-26 13:24:28 -0700
committerMuller, Alexander (A.) <amulle19@ford.com>2016-09-26 13:24:28 -0700
commit6fe7c4917b92936fd1bb670586ad2d28f4220034 (patch)
tree7ced153d8bfcdb51e36a5c21a0ba2cad3ae0c8df /SmartDeviceLink
parent7360e9d9db252e6ac489f7587e6da930273f0165 (diff)
downloadsdl_ios-6fe7c4917b92936fd1bb670586ad2d28f4220034.tar.gz
Fixed issue with not being able to support both Swift 3 and pre-iOS 10 Objective-C.
Diffstat (limited to 'SmartDeviceLink')
-rw-r--r--SmartDeviceLink/SDLNotificationConstants.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/SmartDeviceLink/SDLNotificationConstants.h b/SmartDeviceLink/SDLNotificationConstants.h
index fa367124c..29aaf5528 100644
--- a/SmartDeviceLink/SDLNotificationConstants.h
+++ b/SmartDeviceLink/SDLNotificationConstants.h
@@ -14,7 +14,15 @@
NS_ASSUME_NONNULL_BEGIN
-typedef NSNotificationName SDLNotificationName;
+// Resolves issue of using Swift 3 and pre-iOS 10 versions due to NSNotificationName unavailability.
+#if __IPHONE_OS_VERSION_MAX_ALLOWED <= __IPHONE_9_3
+ #define NOTIFICATION_TYPEDEF NSString*
+#else
+ #define NOTIFICATION_TYPEDEF NSNotificationName
+#endif
+
+typedef NOTIFICATION_TYPEDEF SDLNotificationName;
+
typedef NSString *SDLNotificationUserInfoKey;
#pragma mark - Blocks