“Invariant Violation: Application AwesomeProject has not been registered” When building for iOS device with static jsbundle

后端 未结 14 2304
刺人心
刺人心 2020-12-08 18:20

First off, I don\'t know react, but I figured deploying to an iOS device instead of the simulator wouldn\'t be too difficult to do with the docs. They were a bit sparse but

相关标签:
14条回答
  • 2020-12-08 18:56
    AppRegistry.registerComponent('abc',() => ***); 
    

    the 'abc' must be the same as the moduleName:@'abc' in the file name AppDelegate.m

    0 讨论(0)
  • 2020-12-08 18:58

    I had the same issue. I solved it by giving the same name to both AppDelegate's moduleName and AppRegistry.registerComponent

    If you are running the app with $ react-native run-ios you will need to rename the moduleName field in ./ios/[project name]/AppDelegate.m to match the new name of the project. Refresh the phone simulator and it should show the new code.

    0 讨论(0)
提交回复
热议问题