iOS打包步骤(一、二、三可不按照顺序)
步骤一: 选择iOS Device(以下两者选其中一个即可)
-
选择 Generic iOS Device (个人建议使用这个)
选择Generic iOS Device.png -
选择 你的iOS设备
选择你的iOS设备.png
步骤二: 运行环境下的编译设置(Debug/Release)
-
Xcode-->Product-->Scheme-->Edit Scheme...
(或者如set_the_active_scheme.png所示进行操作)
set_the_active_scheme.png -
Run-->Info-->Build Configuration选择Release模式。最终结果如Release.png所示:

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所示.

Archive.png