jamesfzhang
jamesfzhang

Reputation: 4481

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

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. I don't mind this in development but I still see this message while running on my phone. Here's how I created the bundle. Any ideas? Thanks.

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

Upvotes: 11

Views: 5752

Answers (2)

eliprodigy
eliprodigy

Reputation: 598

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"];

Upvotes: 0

purii
purii

Reputation: 6424

Change Build Configuration to release

To disable the developer menu and therefore your mentioned message, you should change your Build Configuration to Release.

For iOS open your project in Xcode and select Product → Scheme → Edit Scheme... (or press ⌘ + <). Next, select Run from the menu on the left and change the Build Configuration to Release.

Upvotes: 18

Related Questions