Skip to content

Commit e424852

Browse files
authored
Upgrade RN 0.40 Finalization (#678)
* Header changes * update the IOS header linker * header swap
1 parent 5448892 commit e424852

File tree

5 files changed

+22
-3
lines changed

5 files changed

+22
-3
lines changed

ios/CodePush.xcodeproj/project.pbxproj

-2
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@
370370
"$(inherited)",
371371
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
372372
"$(SRCROOT)/../../react-native/React/**",
373-
"$(SRCROOT)/../Examples/CodePushDemoApp/node_modules/react-native/React/**",
374373
);
375374
LIBRARY_SEARCH_PATHS = "$(inherited)";
376375
OTHER_LDFLAGS = (
@@ -389,7 +388,6 @@
389388
"$(inherited)",
390389
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
391390
"$(SRCROOT)/../../react-native/React/**",
392-
"$(SRCROOT)/../Examples/CodePushDemoApp/node_modules/react-native/React/**",
393391
);
394392
LIBRARY_SEARCH_PATHS = "$(inherited)";
395393
OTHER_LDFLAGS = (

ios/CodePush/CodePush.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
#if __has_include("RCTEventEmitter.h")
1+
#if __has_include(<React/RCTEventEmitter.h>)
22
#import <React/RCTEventEmitter.h>
3+
#elif __has_include("RCTEventEmitter.h")
4+
#import "RCTEventEmitter.h"
35
#else
46
#import "React/RCTEventEmitter.h" // Required when used as a Pod in a Swift project
57
#endif

ios/CodePush/CodePush.m

+9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1+
#if __has_include(<React/RCTAssert.h>)
12
#import <React/RCTAssert.h>
23
#import <React/RCTBridgeModule.h>
34
#import <React/RCTConvert.h>
45
#import <React/RCTEventDispatcher.h>
56
#import <React/RCTRootView.h>
67
#import <React/RCTUtils.h>
8+
#else // back compatibility for RN version < 0.40
9+
#import "RCTAssert.h"
10+
#import "RCTBridgeModule.h"
11+
#import "RCTConvert.h"
12+
#import "RCTEventDispatcher.h"
13+
#import "RCTRootView.h"
14+
#import "RCTUtils.h"
15+
#endif
716

817
#import "CodePush.h"
918

ios/CodePush/RCTConvert+CodePushInstallMode.m

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#import "CodePush.h"
2+
3+
#if __has_include(<React/RCTConvert.h>)
24
#import <React/RCTConvert.h>
5+
#else
6+
#import "RCTConvert.h"
7+
#endif
38

49
// Extending the RCTConvert class allows the React Native
510
// bridge to handle args of type "CodePushInstallMode"

ios/CodePush/RCTConvert+CodePushUpdateState.m

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#import "CodePush.h"
2+
3+
#if __has_include(<React/RCTConvert.h>)
24
#import <React/RCTConvert.h>
5+
#else
6+
#import "RCTConvert.h"
7+
#endif
38

49
// Extending the RCTConvert class allows the React Native
510
// bridge to handle args of type "CodePushUpdateState"

0 commit comments

Comments
 (0)