Skip to content

No manager class found for view with module name "RCTText" #537

@meetwudi

Description

@meetwudi

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

var React = require('react-native');

var {
  Text,
  View
} = React;

var styles = React.StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: 'red'
  }
});

class SimpleApp extends React.Component {
  render() {
    return <View style={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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions