Skip to content

Commit

Permalink
Merge pull request #148 from messense/feature/has-include
Browse files Browse the repository at this point in the history
Support RN 0.39 and RN 0.40+
  • Loading branch information
huangminlinux authored Feb 16, 2017
2 parents 3543943 + 916c349 commit 0ae8f8e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
7 changes: 7 additions & 0 deletions ios/RCTJPushModule/RCTJPushModule/RCTJPushModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@

#import <Foundation/Foundation.h>

#if __has_include(<React/RCTBridgeModule.h>)
#import <React/RCTBridgeModule.h>
#elif __has_include("RCTBridgeModule.h")
#import "RCTBridgeModule.h"
#elif __has_include("React/RCTBridgeModule.h")
#import "React/RCTBridgeModule.h"
#endif

#import "JPUSHService.h"

#define kJPFDidReceiveRemoteNotification @"kJPFDidReceiveRemoteNotification"
Expand Down
16 changes: 13 additions & 3 deletions ios/RCTJPushModule/RCTJPushModule/RCTJPushModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,19 @@
#import "RCTJPushModule.h"
#import "RCTJPushActionQueue.h"

#import<React/RCTEventDispatcher.h>
#import<React/RCTRootView.h>
#import<React/RCTBridge.h>
#if __has_include(<React/RCTBridge.h>)
#import <React/RCTEventDispatcher.h>
#import <React/RCTRootView.h>
#import <React/RCTBridge.h>
#elif __has_include("RCTBridge.h")
#import "RCTEventDispatcher.h"
#import "RCTRootView.h"
#import "RCTBridge.h"
#elif __has_include("React/RCTBridge.h")
#import "React/RCTEventDispatcher.h"
#import "React/RCTRootView.h"
#import "React/RCTBridge.h"
#endif

@interface RCTJPushModule () {
BOOL _isJPushDidLogin;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"homepage": "https://github.com/jpush/jpush-react-native#readme",
"peerDependencies": {
"react-native": "> 0.40.0",
"react-native": "> 0.39.0",
"jcore-react-native": ">= 1.0.0"
}
}
}

0 comments on commit 0ae8f8e

Please sign in to comment.