main.jsbundle does not exist. this must be a bug with + echo ‘react native

This issue take me some days to fixed. I got this issue when run the build on travis-ci.
Here is my fix:

Add this line to scripts in your package.json file.

"build:ios": "react-native bundle --entry-file="index.js" --bundle-output="./ios/main.jsbundle" --dev=false --platform='ios'"

Now your can run the command to generate main.jsbundle.
yarn build:ios or npm run build:ios

Open the Xcode > Select project target > add main.jsbundle to Copy Bundle Resource in Build Phases. (image below).

Xcode fix

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)