三步即可
在项目根目录使用终端执行
1 | $ curl http://localhost:8081/index.ios.bundle -o main.jsbundle |
AppDelegate.m
找到这一行并注释
1 | jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"]; |
AppDelegate.m
写上或反注释这一行
1 | jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; |