一、前言:
作为一名iOSer,把开发出来的App上传到App Store是必要的。下面就来详细讲解一下具体流程步骤。
二、准备:
一个已付费的开发者账号(账号类型分为个人(Individual)、公司(Company)、企业(Enterprise)、高校(University)四种类型,每年资费分别为$99、$99、$299、免费。)。
一个已经开发完成的项目。
三、检查:
你的Xcode必须是正式版的,beta版本的Xcode是不能上传项目的。
上传使用的 Mac 的 OS X系统必须也是正式版的,beta版本也不行。

四、生成发布证书
打开苹果开发者中心:https://developer.apple.com打开后点击:Account

下面输入已付款过的Apple账号和密码登录(如果你的电脑已经保存了密码,会直接进入)

开发者登录账号
点击:Certificates, Identifiers & Profiles (专门生成证书,绑定Bundle Id,绑定device设备,生成描述文件的地方)

Member Center
点击Certificates生成证书
选择iOS, tvOS, watchOS
选择All

由于是做App上传,选择生产证书(选择App Store and Ad Hoc)

选择App Store and Ad Hoc
注意:一个开发者账号只能创建(1-2个开发(测试)证书,2-3个生产(发布)证书),如果你的App Store Ad Hoc 前面的按钮不能选择,则代表你的这个账号无法再创建新的生产证书了。解决方法:
从共同使用这个账号的人电脑上生成.p12文件,导入自己的电脑。(尽量不要执行下面第2步)
如果你想生成的话,把现有的删除一个(建议删除时间比较靠前的)。注意:如果删除一个证书,那么正在使用这个证书的人将不能再使用了,除非重新生成,然后利用.p12重新导入自己的电脑里!注意:如果你想删除证书,执行下面步骤,否则略过。

然后接上上图,生产证书部分继续

生成证书2

生成证书3

生成证书4
上传CSR文件去获取证书(CSR文件需要我们到本机钥匙串里去创建)
在Launchpad的其他里面,点击钥匙串访问弹出如下界面


钥匙串访问
工具栏选择钥匙串访问->证书助理->从证书颁发机构请求证书...


证书信息
将CSR文件保存到MAC磁盘的某个位置(这里我选择的是桌面,进行存储)
存储证书
点击完成

CertificateSigningRequest.certSigningRequest 文件
然后回到浏览器,点击choose File..

选择CSR文件
选择创建好的:CertificateSigningRequest.certSigningRequest 文件,点击选取

点击Generate上传证书

上传CSR证书
跳转到如下界面,点击 DownLoad 下载生成的证书(cer后缀的文件),然后点击Done,你创建的发布证书就会存储在帐号中。


cer后缀的文件
注意:这个证书只能下载一次。点击下载后,关闭页面后就不能再回到下载页面了。如果不需要给别的电脑使用,则直接跳过下面附加项,跳转到第五步(绑定Bundle Identifier)
附加项:生成p12文件在其他电脑上使用这个发布证书
双击安装证书后,打开钥匙串访问,选择安装的证书右键单击

注意:如果没有导出,可以把这个证书删除,然后重新双击下载的证书文件安装。导出证书


存储导出的证书
注意:存储的文件格式一定要是.p12
设置密码可以为证书设置密码,也可以不设置密码;如果设置了密码,那么别人安装这个证书的时候就要输入密码,否则无法安装。这里就不设置密码了。
设置密码
保存导出的证书
p12发布证书
如果需要在其它电脑上也能发布App,那么就必须要安装这个发布证书。
五、创建App IDs和绑定你的App的Bundle Identifier
回到刚才的页面:https://developer.apple.com/account/ios/identifiers/bundle/bundleList.action
点击App IDs,进入如下界面,点击右上角的 + 号

填写App IDs和Bundle Identifier

填写App IDs和Bundle Identifier
注意:
上传App使用的Bundle Identifier(不要有-,都是英文+数字)必须是固定的,不能使用占位符。
如果你的Bundle Identifier已经在网站上绑定了,如果你又修改了你工程里面这个Bundle Identifier的话,需要重新进入到开发者账号里面绑定。


App Services
点击continue

点击continue
点击Register

点击Register
点击Done

点击Done
六、生成描述文件(描述文件的作用就是把证书和Bundle Identifier关联起来)
找到Provisioning Profiles ,点击All,然后点击右上角 + 号

Provisioning Profiles
因为是发布,所以选择下面App Store这个描述文件,点击Continue

选择App Store
在App ID 这个选项栏里面找到你刚刚创建的:App IDs(Bundle Identifier) 类型的套装,点击Continue

选择发布项目的Bundle Identifier
选择你刚创建的发布证书(或者生成p12文件的那个发布证书),根据自己电脑上的发布证书日期来选择,点击Continue

选择创建的发布证书
在Profile Name栏里输入一个名字(这个是PP文件的名字,可随便输入,在这里我用工程名字,便于分别),然后点击Generate

给描述文件起个名字
Download生成的PP文件,然后点击Done,双击安装(闪一下就完事了,没其它效果)

Download生成的PP文件

生成的描述文件
六、在App Store开辟空间
回到Member Center,点击iTunes Connect

点击iTunes Connect
登录开发者账号(还是之前已付费的账号)

Snip20160315_68.png
登录成功后,点击我的App

点击我的App
点击左上角那个+号,点击新建(注意:我们是iOS App开发,不要选Mac App啦)

新建 App
依次按提示填入对应信息(SKU是公司用于做统计数据之类的id,根据公司需求填写),然后点击创建

填写App信息
注意:如果都填好以后,可能会告诉你,你的App名称已经被占用,那么不好意思,你只能改名了!(而且建议大家起名不要往比较出名的App上靠,否则审核可能会被拒绝)
填写App其它信息

App信息
填写价格和销售范围(由于我的开发者账号没有签订纳税合同,所以不能上线收费应用,所以只能暂时免费)

填写价格和销售范围
依次把不同尺寸的App截图拉入到对应的里面需要填写不同尺寸的手机屏幕截图(也就是拿不同尺寸的模拟器运行后,挑出至少3页最多5页进行截图然后拖到响应的区里)(在模拟器Command+S 就可以保存屏幕截图到桌面了)(注意:如果提示拖进去的图片尺寸不对,则把模拟器弄成100%然后再Command 加 S) 尺寸参照表在下面

设置不同尺寸的App截图
尺寸参照图

尺寸参照图
填写App简介

填写App简介
按提示依次输入

按提示依次输入
错误提示:如果上传App 图标失败,提示Alpha错误的话,看下面。打开你的图标图片,勾掉这个

点击分级后面的编辑,如实填写后,点击完成

分级信息
填写审核信息

填写审核信息
版本发布就是:(然后最下面选择自动发布的话就是如果审核通过,就自动上传到App Store供人下载)
此时这个构建版本还没有生成,我们先把基本信息填写完毕,然后再进入Xcode中把项目打包发送到过来。注意:填写完一定要点击右上角的保存。
七、在Xcode中打包工程
找到你刚刚下载的发布证书(后缀为.cer)或者p12文件,和PP文件,双击,看起来没反应,但是他们已经加入到你的钥匙串中。
在Xcode中选择iOS Device(这里不能选择模拟器),按照下图提示操作

如果你的应用不支持横屏,把这两个勾去掉

如果你的应用不支持横屏,把这两个勾去掉
查看版本号和构建版本号

查看版本号和构建版本号
配置发布证书

配置发布证书
注意:如果这里没有黄色叹号,代表你的配置没问题,如果有,那就是证书和描述文件不匹配,或者描述文件里刚才选的Bundle和现在的工程的Bundle Identifier不一致,去develop.apple.com 上找到你的描述文件在确认下绑定的bundle Identifier和你工程是不是一样的?

将断点、全局断点,僵尸模式等都要去掉。


Snip20160315_36.png

Snip20160315_37.png

去掉僵尸模式
6.设置Release模式(Debug是测试的,Release是发布用的)

Snip20160315_39.png

Snip20160315_40.png

Snip20160315_41.png

Snip20160315_42.png
7.选择 Xcode下 Product 下 Archive(专门用于传项目,或者打包项目)

选择Archive

Snip20160315_45.png

Snip20160315_46.png
8.出现下图说明你没有添加开发者账号,点击右下脚Add... 按钮就可以添加

没有添加开发者账号
9.输入付费的开发者账号

输入开发者账号
可能会弹出下面这个界面,如果不弹出,按Command加。

10.然后回到Archive(选择已付费的账号),然后点击Choose

选择已付费的账号
然后等待

等待
11.选择Upload提交

Upload提交
12.如下就代表上传成功,如果出错,请参照iOS App上传项目遇到的问题

13.返回ItunesConnect网站上你自己的App信息中查看一下

在App信息中查看
14.在这个构建版本这里就可以添加代码

添加代码
点击+号之后选择代码版本

添加构建版本
15.提交以供审核

提交以供审核
16.App已经从准备提交,变成正在等待审核状态

正在等待审核状态
17.等待苹果的审核...
文/冰晨(简书作者)原文链接:http://www.jianshu.com/p/b1b77d804254#著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。
网友评论