KjellConnelly / react-native-rate

Send your app users to Apple App Store, Google Play, Amazon, or other using the newest APIs
635 stars 100 forks source link

fix: duplicate definitions for React #105

Open pixelknitter opened 2 years ago

pixelknitter commented 2 years ago

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch react-native-rate@1.2.9 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-rate/ios/RNRate.h b/node_modules/react-native-rate/ios/RNRate.h
index fe6c66a..3d4e42d 100644
--- a/node_modules/react-native-rate/ios/RNRate.h
+++ b/node_modules/react-native-rate/ios/RNRate.h
@@ -1,11 +1,6 @@

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

This issue body was partially generated by patch-package.