问题
I'm bilding mobile app the following technologies.
react-native: v0.60.0
react-native-navigation: 3.0.0-alpha.2
And I build this app for iOS, then the following error message appears in the ReactNativeNavigation code.
React/RCTConvert.h file not found
The error file is Pods/Development Pods/ReactNativeNavigation/RNNOptions.h
, and this is the content of it.
#import <UIKit/UIKit.h>
#import <React/RCTConvert.h>
#import "BoolParser.h"
#import "TextParser.h"
#import "NumberParser.h"
#import "DictionaryParser.h"
#import "ColorParser.h"
#import "ImageParser.h"
#import "IntNumberParser.h"
#import "DoubleParser.h"
@interface RNNOptions : NSObject
- (instancetype)initWithDict:(NSDictionary*)dict;
- (RNNOptions *)overrideOptions:(RNNOptions *)otherOptions;
- (RNNOptions *)mergeOptions:(RNNOptions *)otherOptions;
- (RNNOptions *)mergeInOptions:(RNNOptions *)otherOptions;
- (RNNOptions *)withDefault:(RNNOptions *)defaultOptions;
@end
I have already tried,
- Following this tutorial
But it didn't work well, so I additionally tried these.
- Insert
pod 'ReactNativeNavigation', :path => '../node_modules/react-native-navigation'
intoios/Podfile
. Run
react-native link react-native-navigation
andpod install
inios
directoryClean and rebuild the proejct in Xcode.
回答1:
with react native 0.60+ you don't need to link react native navigation manually.
simply run react-native link react-native-navigation
and cd ios; pod install
for more information please see this issue
来源:https://stackoverflow.com/questions/57237624/react-rctconvert-h-file-not-found-with-reactnativenavigation-ver3