Ilja Ilja -3 years ago 140
iOS Question

main.jsbundle, Foundation and Security missing in the project, causing error

I've noticed that file

main.jsbundle
file is missing from the project and am not sure of how to fix it, should I delete the file / is there a step I can perform to fix it?

Here is a screenshot of where it is in the project:

enter image description here

Update:

Similar issue appears with following frameworks as well

enter image description here

Answer Source

The problem can be resolved as follows

  • By using the react native command line
  • $ react-native bundle --entry-file ./index.ios.js --platform ios --bundle-output ios/main.jsbundle using this in the root of the react native project
  • When the main.jsbundle file is generated add it back to the Add Files to Project option
  • Just verify that the file is included in the build phase and re-build

Update For the asset destination to be set they have to be in same folder.

Try this,it would create the asset folder

$ react-native bundle --entry-file ./index.ios.js --platform ios --bundle-output ios/main.jsbundle --assets-dest ./ios
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download