I am trying to embed React Native app into a existing iOS App. I initialized one RCTRootView and add it as a subview to a UIView.
NSString *urlString = @"http://localhost:8081/index.ios.bundle";
NSURL *jsCodeLocation = [NSURL URLWithString:urlString];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName: @"SimpleApp"
launchOptions:nil];
[self.reactView addSubview:rootView];
And the view in JS
varReact=require('react-native');var{
Text,
View
}=React;varstyles=React.StyleSheet.create({container: {flex: 1,backgroundColor: 'red'}});classSimpleAppextendsReact.Component{render(){return<Viewstyle={styles.container}><Text>This is a simple application.</Text></View>;}}React.AppRegistry.registerComponent('SimpleApp',()=>SimpleApp);But then I got
[RCTLog][tid:0x7fe5e2accc20][RCTUIManager.m:710]>No manager class found for view with module name "RCTText"
[RCTLog][tid:0x7fe5e2accc20][RCTUIManager.m:710]>No manager class found for view with module name "RCTRawText"
No error message for RCTView, but only RCTText and RCTRawText.
Any clue what's going on? Thanks :)
I am trying to embed React Native app into a existing iOS App. I initialized one RCTRootView and add it as a subview to a UIView.
And the view in JS
But then I got
No error message for RCTView, but only RCTText and RCTRawText.
Any clue what's going on? Thanks :)