1.打包命令:
react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ./ios/main.jsbundle --assets-dest ./ios/bundle
这时候对应项目目录:

main.jsbundle就会生成对应的新的js代码。同时生成了bundle资源文件夹。
需要在Xcode中添加资源到项目中,必须选择Create folder references的方式添加文件夹。

添加完成后就可以对项目进行打包上传了:

网友评论