2
votes

When I switch my iOS project to the release schema (as described https://facebook.github.io/react-native/docs/running-on-device.html), I get this error:

2016-11-29 11:49:01.621 [fatal][tid:main] No script URL provided. Make sure the packager is running or you have embedded a JS bundle in your application bundle.unsanitizedScriptURLString:((null))

Do I need to create a static js bundle in production mode? The docs suggest that in earlier React Native docs, but I'm running React Native 0.35 (originally 0.30)

3
How did you upgrade your app from 0.30 to 0.35? Did you run react-native upgrade afterwards? Your AppDelegate.m should look like this: github.com/facebook/react-native/blob/master/local-cli/…martinarroyo
Thanks, I did run react-native upgrade, and I can confirm I have the new RCTBundleURLProvider code: jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];Chih-Chao Lam
When I try to manually bundle the app via react-native bundle --platform ios --dev false --entry-file index.ios.js --bundle-output iOS/main.jsbundle I get this error: TransformError: [deleted]/node_modules/firebase/database.js: [deleted]/node_modules/firebase/database.js: Property consequent of ConditionalExpression expected node to be of a type ["Expression"] but instead got null Could that be the issue?Chih-Chao Lam

3 Answers

7
votes

Finally resolved my issue. I was using a babel plugin to remove console.log statements as suggested by the docs. Removing the plugin got things working again

0
votes

We solved this by unchecking "Run script only when installing" in XCode->Project Settings->Build Phases->Bundle React Native code and Images

0
votes

Looks like Facebook is suggesting a babel-plugin-transform-remove-console solution that just does not work: See issue https://github.com/facebook/react-native/issues/10412

I think something like this is badly needed to auto-remove console.log statements in a release build.