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

React Native 之 main.jsbundle生成方法

2016-02-05 17:51 579 查看
坚持 成长 每日一篇

步骤:

1.在React Native项目根目录下运行 npm start

2.使用curl命令生成 main.jsbundle

curl http://localhost:8081/index.ios.bundle -o main.jsbundle


3.在AppDelegate.m中选择使用main.jsbundle

注释掉

jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];


取消注释下面这一行

// jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: