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”];
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”];
相关文章推荐
- React-Native打包发布(Android)
- React-Native打包发布(Android)
- React-Native打包发布(Android)
- React-Native打包发布(Android)
- React native真机调试
- Mac 配置react native环境
- react-native 安装指定的版本
- 半小时深刻理解React
- 利用React/anu编写一个弹出层
- (React-Native 学习之七) Rn混合开发之--Activity直接引用React native组件
- React Native JavaScripts的实用小技巧
- react-native播放视频组件 react-native-video的用法
- React:组件API
- 4. React 属性和状态介绍
- React-Native 错误集锦
- React Echarts 拖拽<github持续更新中>
- Qzone React Native改造
- react-native调用Android原生模块
- 【ReactJS】React项目构建的几种方式
- React Native 集成到原有Android项目中