iOS App打包上架超详细流程1
iOS App打包上架超详细流程(手把手图文教你)
一、前言:
- 作为一名iOS开发者,把辛辛苦苦开发出来的App上传到App Store是件必要的事。但是很多人还是不知道该怎么上传到App Store上
- 下面就来详细讲解一下具体流程步骤。
二、准备:
- 一个已付费的开发者账号(可分为):
- 账号类型分为个人(Individual)
- 公司(Company)
- 企业(Enterprise)
- 高校(University)四种类型
- 每年资费分别为$99、$99、$299、免费。
- 一个已经开发完成的项目。
三、检查:
- 安装的Xcode必须为正式版,beta版本的Xcode不能上传项目到App Store。
- 上传使用的 Mac 的 OS X系统必须也是正式版的,beta版本也不行。
- 请确认你安装的Xcode是从App Store或者是开发者网站下载的
- 因为非官方途径下载的Xcode可能带有XcodeGhost 病毒。如何检查?
1.jpg
四、生成发布证书
1.打开开发者中心网址:https://developer.apple.com
2.点击:Account
![](http://upload-images.jianshu.io/upload_images/1701439-58abb4f188c80fe9.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
2.png
3.输入账号和密码登录
![](http://upload-images.jianshu.io/upload_images/1701439-a50e1bd4b7135245.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
3.png
4.点击:Certificates, Identifiers & Profiles
- 专门生成证书,绑定Bundle Id,绑定device设备,生成描述文件的地方
![](http://upload-images.jianshu.io/upload_images/1701439-bc308fc5a7d4c7d8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
4.png
5.点击Certificates生成证书
- 选择iOS, tvOS, watchOS
- 选择All
- 点击右上角新添加证书
![](http://upload-images.jianshu.io/upload_images/1701439-62e5e24fa26dee44.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
5.png
6.选择生产证书(选择App Store and Ad Hoc)
![](http://upload-images.jianshu.io/upload_images/1701439-a8a5fd57ac936987.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
6.png
注意:一个开发者账号只能创建(1-2个开发(测试)证书,2-3个生产(发布)证书),如果你的App Store Ad Hoc 前面的按钮不能选择,则代表你的这个账号无法再创建新的生产证书了。
解决方法:
从共同使用这个账号的人电脑上生成.p12文件,导入自己的电脑。(尽量不要执行下面第2步)
如果你想生成的话,把现有的删除一个(建议删除时间比较靠前的)。注意:如果删除一个证书,那么正在使用这个证书的人将不能再使用了,除非重新生成,然后利用.p12重新导入自己的电脑里!
注意:如果你想删除证书,执行下面步骤,否则略过。
![](http://upload-images.jianshu.io/upload_images/1701439-6265568c9feee941.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
7.png
![](http://upload-images.jianshu.io/upload_images/1701439-8c7471ac278193e3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
8.png
![](http://upload-images.jianshu.io/upload_images/1701439-30fa466c9252d4ff.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
9.png
![](http://upload-images.jianshu.io/upload_images/1701439-f2c2ee7d15490f0a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
10.png
![](http://upload-images.jianshu.io/upload_images/1701439-675344fcf1127e9e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
11.png
7.上传CSR文件去获取证书(CSR文件需要我们到本机钥匙串里去创建)
- 在Launchpad的其他里面,点击钥匙串访问弹出如下界面
![](http://upload-images.jianshu.io/upload_images/1701439-8d969f4b35a807aa.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
12.png
![](http://upload-images.jianshu.io/upload_images/1701439-1f692f49afe9b114.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
13.png
- 工具栏选择钥匙串访问->证书助理->从证书颁发机构请求证书...
![](http://upload-images.jianshu.io/upload_images/1701439-4f8f064601aa9d95.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](http://upload-images.jianshu.io/upload_images/1701439-41b6a7eadf20a5a8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
15.png
- 将CSR文件保存到MAC磁盘的某个位置(这里我选择的是桌面,进行存储)
![](http://upload-images.jianshu.io/upload_images/1701439-757b321329682f4c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
16.png
![](http://upload-images.jianshu.io/upload_images/1701439-e7a2e142185639bd.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
17.png
![](http://upload-images.jianshu.io/upload_images/1701439-74ecdfcc82c5b6b3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
18.png
- 然后回到浏览器,点击choose File..
![](http://upload-images.jianshu.io/upload_images/1701439-f1cdb587de63dc02.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
19.png
- 选择创建好的:CertificateSigningRequest.certSigningRequest 文件,点击选取
![](http://upload-images.jianshu.io/upload_images/1701439-743f0a95d5b7141d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
20.png
- 点击Generate上传证书
![](http://upload-images.jianshu.io/upload_images/1701439-e69693bce2013bcf.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
21.png
- 跳转到如下界面,点击 DownLoad 下载生成的证书(cer后缀的文件),然后点击Done,你创建的发布证书就会存储在帐号中。
![](http://upload-images.jianshu.io/upload_images/1701439-ac691b546d4bc29e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
22.png
![](http://upload-images.jianshu.io/upload_images/1701439-2731d65ad5f0c937.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
23.png
注意:
这个证书只能下载一次。点击下载后,关闭页面后就不能再回到下载页面了。
如果不需要给别的电脑使用,则直接跳过下面附加项,跳转到第五步(绑定Bundle Identifier)
附加项:生成p12文件在其他电脑上使用这个发布证书
- 双击安装证书后,打开钥匙串访问,选择安装的证书右键单击
![](http://upload-images.jianshu.io/upload_images/1701439-3257227161a0d7ed.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
24.png
注意:如果没有导出,可以把这个证书删除,然后重新双击下载的证书文件安装。
-
导出证书
25.png -
存储证书
26.png
注意:存储的文件格式一定要是.p12
- 设置密码
可为证书设置密码,也可不设置密码;如果设置了密码,那么别人安装这个证书的时候就要输入密码,否则无法安装。
![](http://upload-images.jianshu.io/upload_images/1701439-0d6432566723c39c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
27.png
如果需要在其它电脑上也能发布App,那么就必须要安装这个发布证书。
![](http://upload-images.jianshu.io/upload_images/1701439-0033fb5d4780f2ba.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
28.png
五、创建App IDs和绑定你的App的Bundle Identifier
https://developer.apple.com/account/ios/identifiers/bundle/bundleList.action
![](http://upload-images.jianshu.io/upload_images/1701439-cb158db113c52411.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
29.png
![](http://upload-images.jianshu.io/upload_images/1701439-a851afc3bb5453fa.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
30.png
注意:
上传App使用的Bundle Identifier,不能使用占位符。
如果你的Bundle Identifier已经在网站上绑定了,如果你又修改了你工程里面这个Bundle Identifier的话,需要重新进入到开发者账号里面绑定。
![](http://upload-images.jianshu.io/upload_images/1701439-518345370024ca0b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
31.png
- 选择App中包含的服务,默认有两项
![](http://upload-images.jianshu.io/upload_images/1701439-211cfec2ca7a508f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
32.png
![](http://upload-images.jianshu.io/upload_images/1701439-55fb47df591068d3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
33.png
![](http://upload-images.jianshu.io/upload_images/1701439-c76b32716881fd72.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
34.png
![](http://upload-images.jianshu.io/upload_images/1701439-1b703423ab15f08a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
35.png
六、生成描述文件
- 找到Provisioning Profiles ,点击All,然后点击右上角 + 号
![](http://upload-images.jianshu.io/upload_images/1701439-569e5443aa57ed71.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
36.png
- 选择下面App Store这个描述文件,点击Continue
![](http://upload-images.jianshu.io/upload_images/1701439-fa7fa2b18c6e2e1c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
37.png
![](http://upload-images.jianshu.io/upload_images/1701439-1252de9f5d3d9530.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
38.png
![](http://upload-images.jianshu.io/upload_images/1701439-e0993c24df4a03b6.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
39.png
![](http://upload-images.jianshu.io/upload_images/1701439-0938bab2953c4255.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
40.png
![](http://upload-images.jianshu.io/upload_images/1701439-0f36c155136b3a07.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
41.png
![](http://upload-images.jianshu.io/upload_images/1701439-26fe3fcaa43dce86.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
42.png
七、在App Store开辟空间
- 回到Member Center,点击iTunes Connect
![](http://upload-images.jianshu.io/upload_images/1701439-10d82b239fda9ab0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
43.png
![](http://upload-images.jianshu.io/upload_images/1701439-fe816a361d53b2f2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
44.png
![](http://upload-images.jianshu.io/upload_images/1701439-355387eeacb17799.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
45.png
![](http://upload-images.jianshu.io/upload_images/1701439-516e593413cdb5e9.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
46.png
![](http://upload-images.jianshu.io/upload_images/1701439-d431237cadf85d64.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
47.png
注意:如果都填好以后,可能会告诉你,你的App名称已经被占用,那你只能改名了!
![](http://upload-images.jianshu.io/upload_images/1701439-1cfef6b50d81d4bb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
48.png
![](http://upload-images.jianshu.io/upload_images/1701439-3f48f2f3e3a6ae2d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
49.png
![](http://upload-images.jianshu.io/upload_images/1701439-537eeb08c8c8a8ee.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
50.png
![](http://upload-images.jianshu.io/upload_images/1701439-017c01cf2536f21e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
51.png
![](http://upload-images.jianshu.io/upload_images/1701439-4c515fbd2ec362d5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
52.png
![](http://upload-images.jianshu.io/upload_images/1701439-4d8232e91314fb9b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
53.png
![](http://upload-images.jianshu.io/upload_images/1701439-5395bc4f803ec71a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
54.png
![](http://upload-images.jianshu.io/upload_images/1701439-78bf7573b6b1137e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
55.png
![](http://upload-images.jianshu.io/upload_images/1701439-c41510353a4c5460.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
56.png
八、在Xcode中打包工程
-
找到你刚刚下载的发布证书(后缀为.cer)或者p12文件,和PP文件,双击,看起来没反应,但是他们已经加入到你的钥匙串中。
-
在Xcode中选择iOS Device(这里不能选择模拟器),按照下图提示操作
![](http://upload-images.jianshu.io/upload_images/1701439-90c949f4ecda9426.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
57.png
![](http://upload-images.jianshu.io/upload_images/1701439-19ea0d47647ca7d2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
58.png
![](http://upload-images.jianshu.io/upload_images/1701439-31fe2e1032e897d8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
59.png
注意:如果这里没有黄色叹号,代表你的配置没问题,如果有,那就是证书和描述文件不匹配,或者描述文件里刚才选的Bundle和现在的工程的Bundle Identifier不一致,去develop.apple.com 上找到你的描述文件在确认下绑定的bundle Identifier和你工程是不是一样的?
![](http://upload-images.jianshu.io/upload_images/1701439-8ace1996c39baaaa.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
60.png
![](http://upload-images.jianshu.io/upload_images/1701439-6f086311f28c644b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
61.png
![](http://upload-images.jianshu.io/upload_images/1701439-7a21f2ee7b25a3f1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
62.png
![](http://upload-images.jianshu.io/upload_images/1701439-9c3c6becc10ce825.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
63.png
![](http://upload-images.jianshu.io/upload_images/1701439-3bf95f70300595eb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
64.png
![](http://upload-images.jianshu.io/upload_images/1701439-1e9504c0a02cd13d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
65.png
![](http://upload-images.jianshu.io/upload_images/1701439-5be14e36a411b927.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
66.png
![](http://upload-images.jianshu.io/upload_images/1701439-153c58d0fcf19e9e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
67.png
![](http://upload-images.jianshu.io/upload_images/1701439-be6fc4c1a9848377.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
68.png
![](http://upload-images.jianshu.io/upload_images/1701439-6a5cb0e853c3ee91.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
69.png
![](http://upload-images.jianshu.io/upload_images/1701439-1fb45f23896244ae.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
70.png
![](http://upload-images.jianshu.io/upload_images/1701439-5c15700a8e664116.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
71.png
![](http://upload-images.jianshu.io/upload_images/1701439-0214cea172939b1c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
72.png
![](http://upload-images.jianshu.io/upload_images/1701439-d59a5ff58c46c656.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
73.png
![](http://upload-images.jianshu.io/upload_images/1701439-458dbde3e69c7408.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
74.png
![](http://upload-images.jianshu.io/upload_images/1701439-96c5cc0d47668dea.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
75.png
![](http://upload-images.jianshu.io/upload_images/1701439-855f2a397bbb2e7c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
76.png
![](http://upload-images.jianshu.io/upload_images/1701439-43d1163da2bdce18.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
77.png
![](http://upload-images.jianshu.io/upload_images/1701439-5569eb4adf575894.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
78.png
![](http://upload-images.jianshu.io/upload_images/1701439-fd4a7475d28c9e96.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
79.png
![](http://upload-images.jianshu.io/upload_images/1701439-cdcfd0e872e21df0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
80.png
![](http://upload-images.jianshu.io/upload_images/1701439-07e3cd148f8c58ee.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
81.png
![](http://upload-images.jianshu.io/upload_images/1701439-d44d6c45da11ee23.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
82.png
![](http://upload-images.jianshu.io/upload_images/1701439-1a019ef3509a1e56.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
83.png
![](http://upload-images.jianshu.io/upload_images/1701439-a407f92ab08813e3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
84.png
- 等待APP的审核...
八、补充
- 构建版本的方法有两种
- 一种是使用 Xcode(上面已经介绍了)
- 另一种就是使用一个叫 Application Loader 这个软件:
![](http://upload-images.jianshu.io/upload_images/1701439-542969aed99b808a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
85.png
![](http://upload-images.jianshu.io/upload_images/1701439-b9406e70cfc9fee2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
86.png
![](http://upload-images.jianshu.io/upload_images/1701439-9957703e2b33dec1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
87.png
![](http://upload-images.jianshu.io/upload_images/1701439-3723b69cc37d634e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
88.png
![](http://upload-images.jianshu.io/upload_images/1701439-845cc6391439b424.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
89.png
- 个人觉得还是这个工具好用!