新建项目报错如下:
需要手动生成ios下的main.jsbundle文件
解决方法:
1、生成main.jsbundle文件,在终端项目目录下执行:
react-nativebundle--entry-file index.js--bundle-output./ios/main.jsbundle--platform ios--assets-dest./ios--devfalse
或在 package.json 里面添加以下执行命令,终端执行yarn buildios即可生成main.jsbundle文件:
"buildios":"react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'",
2、然后在xcode添加,然后重新打包就可以了
参考原文:https://www.jianshu.com/p/f3a09d2d49d2
- React-native present native bundle Reactreact-native present native bundle react-native native react react-native-vector-icons react-native react-native unavailable fsevents watcher react-native native系统react react react-native片段 代码 react-native解决方案 方案native react-native native问题react react-native webview native问题 react-native native手机react