1 | # mole-rn-cli
|
2 |
|
3 | a React Native starter powered by mole-rn-cli.
|
4 |
|
5 | ## 开发
|
6 |
|
7 | ```
|
8 | npm run start-web // 启动web端
|
9 |
|
10 | npm run start-ios // ios: 编译项目并启动模拟器
|
11 |
|
12 | npm run start-rn // 如果模拟器已经启动,只需要运行次命令编译js bundle文件
|
13 |
|
14 | ```
|
15 |
|
16 | ## 调试
|
17 |
|
18 | ```
|
19 | 目录: ios/{项目名称}/AppDelegate.m 做如下修改:
|
20 | 上线前:
|
21 | // jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
|
22 | 开发时:
|
23 | jsCodeLocation = [NSURL URLWithString:@"http://127.0.0.1:8081/index.bundle?platform=ios&dev=true"];
|
24 |
|
25 |
|
26 | ```
|