React Native 0.49 in iOS I clone my project install npm and link from git and run but it has error in RCTBridgeModule.h in code
typedef struct RCTMethodInfo {
const char *const jsName;
const char *const objcName;
const BOOL isSync;
} RCTMethodInfo;
it have 2 Error
Redefinition of 'RCTMethodInfo' and Typedef redefinition with different types ('struct (anonymous struct at ../../react-native/React/Base/RCTBridgeModule.h:57:16)' vs 'struct RCTMethodInfo')
I fine solution and included
#if __has_include(<React/RCTBridgeModule.h>)
#import <React/RCTBridgeModule.h>
else
#import "RCTBridgeModule.h"
#endif
but it error same
I happend to encountered this issue just now.It was caused by a third party penguin called "react-native-weibo".I just changed #import "RCTBridgeModule" to #import <React/RCTBridgeModule.h> inside RCTWeiboAPI ,then everything is ok now.
so if your issue is caused by third party penguin also,just try to change #import "xxxx.h" to #import <React/xxxx.h> inside third party API.
Hope it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With