React Native iOS端打包

1.打包命令:

react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ./ios/main.jsbundle --assets-dest ./ios/bundle

这时候对应项目目录:


image.png

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

image.png

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


image.png

你可能感兴趣的:(React Native iOS端打包)