How to get rid of the “Loading from pre-bundled file” message?

前端 未结 2 1553
太阳男子
太阳男子 2021-02-04 10:46

After the launchscreen, but before app is loaded, there\'s a \"Loading from pre-bundled file\" message that appears at the top of the screen for just a few hundred milliseconds.

2条回答
  •  星月不相逢
    2021-02-04 11:46

    Also you can run this

    react-native bundle --entry-file index.ios.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios
    

    And then change in xcode class AppDelegate.m

     //jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
    
      jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
    

提交回复
热议问题