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、然后在TARGES 找到这里并添加,然后重新打包就可以了

3,添加资源文件夹

参考文章:
https://www.jianshu.com/p/cdae4e2c8a41
https://www.jianshu.com/p/100fdf06f277
网友评论