React Native之iOS App打包
2016-04-10 本文已影响6593人
laznrbfe
iOS打包步骤(一、二、三可不按照顺序)
步骤一: 选择iOS Device(以下两者选其中一个即可)
- 选择 Generic iOS Device (个人建议使用这个)

- 选择 你的iOS设备

步骤二: 运行环境下的编译设置(Debug/Release)
- Xcode-->Product-->Scheme-->Edit Scheme...
(或者如set_the_active_scheme.png所示进行操作)

- Run-->Info-->Build Configuration选择Release模式。最终结果如Release.png所示:

步骤三: “告别”Node服务器,“拥抱”main.jsbundle
在AppDelegate.m
文件中
// jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
步骤四: 归档(Archive)
Xcode-->Product-->Archive-->等待...直到如Archive.png所示.
