diff options
author | Muller, Alexander (A.) <amulle19@ford.com> | 2016-09-26 13:24:28 -0700 |
---|---|---|
committer | Muller, Alexander (A.) <amulle19@ford.com> | 2016-09-26 13:24:28 -0700 |
commit | 6fe7c4917b92936fd1bb670586ad2d28f4220034 (patch) | |
tree | 7ced153d8bfcdb51e36a5c21a0ba2cad3ae0c8df /SmartDeviceLink | |
parent | 7360e9d9db252e6ac489f7587e6da930273f0165 (diff) | |
download | sdl_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.h | 10 |
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 |