您的位置:首页 > Web前端 > React

React-Native打包发布

2016-09-29 15:03 267 查看
1.生成bundle文件
cd到工程目录下,执行命令行代码: react-native bundle --entry-file index.ios.js --bundle-output ios/main.jsbundle --platform ios --assets-dest ./ios --dev false

2.ios项目,修改AppDelegate.m文件(使用main...jsbundle这句,注释掉localhost:8081.....这句):
//  jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
   jsCodeLocation = [[NSBundlemainBundle]URLForResource:@"main"withExtension:@"jsbundle”];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: