Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ios/CodePush/CodePush.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#if __has_include("RCTEventEmitter.h")
#import "RCTEventEmitter.h"
#import <React/RCTEventEmitter.h>
Copy link
Copy Markdown
Contributor

@sergey-akhalkov sergey-akhalkov Jan 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make CodePush able to work both with react-native@0.40.0 and react-native@0.39.2 we probably should use:

#if __has_include("RCTEventEmitter.h")
#import "RCTEventEmitter.h"
#elif __has_include(<React/RCTEventEmitter.h>)
#import <React/RCTEventEmitter.h>
#else
#import "React/RCTEventEmitter.h"   // Required when used as a Pod in a Swift project
#endif

#else
#import "React/RCTEventEmitter.h" // Required when used as a Pod in a Swift project
#endif
Expand Down
12 changes: 6 additions & 6 deletions ios/CodePush/CodePush.m
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#import "RCTAssert.h"
#import "RCTBridgeModule.h"
#import "RCTConvert.h"
#import "RCTEventDispatcher.h"
#import "RCTRootView.h"
#import "RCTUtils.h"
#import <React/RCTAssert.h>
#import <React/RCTBridgeModule.h>
#import <React/RCTConvert.h>
#import <React/RCTEventDispatcher.h>
#import <React/RCTRootView.h>
#import <React/RCTUtils.h>
Copy link
Copy Markdown
Contributor

@sergey-akhalkov sergey-akhalkov Jan 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same here:

#if __has_include("RCTAssert.h")
#import "RCTAssert.h"
#else
#import <React/RCTAssert.h>
#endif

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

#if __has_include("RCTConvert.h")
#import "RCTConvert.h"
#else
#import <React/RCTConvert.h>
#endif

#if __has_include("RCTEventDispatcher.h")
#import "RCTEventDispatcher.h"
#else
#import <React/RCTEventDispatcher.h>
#endif

#if __has_include("RCTRootView.h")
#import "RCTRootView.h"
#else
#import <React/RCTRootView.h>
#endif

#if __has_include("RCTUtils.h")
#import "RCTUtils.h"
#else
#import <React/RCTUtils.h>
#endif


#import "CodePush.h"

Expand Down
4 changes: 2 additions & 2 deletions ios/CodePush/RCTConvert+CodePushInstallMode.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "CodePush.h"
#import "RCTConvert.h"
#import <React/RCTConvert.h>
Copy link
Copy Markdown
Contributor

@sergey-akhalkov sergey-akhalkov Jan 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#import "CodePush.h"
#if __has_include("RCTConvert.h")
#import "RCTConvert.h"
#else
#import <React/RCTConvert.h>
#endif


// Extending the RCTConvert class allows the React Native
// bridge to handle args of type "CodePushInstallMode"
Expand All @@ -11,4 +11,4 @@ @implementation RCTConvert (CodePushInstallMode)
CodePushInstallModeImmediate, // Default enum value
integerValue)

@end
@end
4 changes: 2 additions & 2 deletions ios/CodePush/RCTConvert+CodePushUpdateState.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "CodePush.h"
#import "RCTConvert.h"
#import <React/RCTConvert.h>
Copy link
Copy Markdown
Contributor

@sergey-akhalkov sergey-akhalkov Jan 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#import "CodePush.h"
#if __has_include("RCTConvert.h")
#import "RCTConvert.h"
#else
#import <React/RCTConvert.h>
#endif


// Extending the RCTConvert class allows the React Native
// bridge to handle args of type "CodePushUpdateState"
Expand All @@ -12,4 +12,4 @@ @implementation RCTConvert (CodePushUpdateState)
CodePushUpdateStateRunning, // Default enum value
integerValue)

@end
@end