Reputation: 897
I upgraded to React Native v0.37. The iOS Simulator works fine but when trying to run the app on a device I get the error:
[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))
Does anyone have a clue why?
Many thanks in advance for your help.
Upvotes: 3
Views: 768
Reputation: 897
OK, so I had the issue again after upgrading to React Native 0.38.
I ran "react-native bundle --dev false --assets-dest ./ios --entry-file index.ios.js --platform ios --bundle-output ios/main.jsbundle" to do the bundling in a clean way and figured out that there was an error caused by a Babel plugin configuration issue. After cleaning my .babelrc file, the packaging is working perfectly well. It then generates the main.jsbundle, and you have to add it to the project in xcode. After that compilation runs fine.
Upvotes: 1
Reputation: 301
Make sure you are allowing localhost in you Info.plist
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
Upvotes: 1