From fb2111c027dd354200f6b22f04bda0da88a70161 Mon Sep 17 00:00:00 2001 From: Gustavo Perdomo Date: Tue, 14 Feb 2017 12:31:41 -0300 Subject: [PATCH] Add support to RN 0.40 --- .travis.yml | 2 +- RNNotifications/RNNotifications.h | 4 ++++ RNNotifications/RNNotifications.m | 16 ++++++++++++---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4909f83..0fe294a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,3 @@ language: node_js node_js: - - "6" + - "7" diff --git a/RNNotifications/RNNotifications.h b/RNNotifications/RNNotifications.h index f72b424..117a569 100644 --- a/RNNotifications/RNNotifications.h +++ b/RNNotifications/RNNotifications.h @@ -1,6 +1,10 @@ @import UIKit; +#ifdef __has_include() +#import +#else #import "RCTBridgeModule.h" +#endif #import @interface RNNotifications : NSObject diff --git a/RNNotifications/RNNotifications.m b/RNNotifications/RNNotifications.m index 1f8f906..10ac4d3 100644 --- a/RNNotifications/RNNotifications.m +++ b/RNNotifications/RNNotifications.m @@ -1,11 +1,19 @@ #import #import -#import "RCTBridge.h" -#import "RCTEventDispatcher.h" +#if __has_include() +#import +#import #import "RNNotifications.h" -#import "RCTConvert.h" -#import "RCTUtils.h" +#import +#import +#else + #import "RCTBridge.h" + #import "RCTEventDispatcher.h" + #import "RNNotifications.h" + #import "RCTConvert.h" + #import "RCTUtils.h" +#endif #import "RNNotificationsBridgeQueue.h" NSString* const RNNotificationCreateAction = @"CREATE"; -- 2.26.2