IOS苹果APP打包和上线步骤
苹果APP打包和上线步骤:

点击钥匙串创建证书(创建步骤如下);

在钥匙串打开之后,点击钥匙串访问,选择证书助理,点击从证书颁发机构请求证书,点击之后会弹出如下界面:


这里生成的证书,会在开发者账户中使用到;
登陆开发者账户,网址如下:https://developer.apple.com
点击Accont,跳转到登陆页面;


登陆开发者账户开始创建根证书,用于发布(一个开发者账号只需要创建一个根证书,如果再次创建根证书,上一个根证书会失效);


点击创建证书按钮之后会弹出如下界面;

我们选择创建发布证书;

让后点击continue,再点击continue,然后出现如下界面;


点击continue,下载创建好的证书;

注意:(只有创建证书的这台电脑下载证书才有用,其他电脑下载没有);
然后点击done完成证书的创建;

双击下载下来的证书;

双击之后点击钥匙串;

找到刚才双击导入的证书(新证书一般在最上面);

点击证书上面的箭头,展开证书,选中专用密钥;

之后弹出如下界面,选择导出私钥(这里的私钥是为了让那些没有创建根证书的电脑使用的) 只有创建根证书的电脑下载了根证书才能创建私钥,其他电脑无法直接使用根证书创建私钥.(如果有人在根证书存在的情况下重新创建了证书,则原来的证书会失效,创建这要负责重新生成私钥给其他人使用)。

弹出如下界面;


完成私钥的导出(如果是独立开发,没有其他人要使用密钥,则无需导出私钥)。
现在开始创建App id(同样是在开发者账户中);

创建APP id(app id可以创建很多个,每个app都有一个app id与之对应);

设置bundle id ,为了后面上传app(一般是com.xxxxx);

点击continue 然后点击register ,再点击done;

开始创建描述文件(将编写的代码和app id 关联起来)(每个app id都需要创建一个描述文件,创建之后下载下来,在Xcode中使用);

点击右上角的加号来创建描述文件,会弹出如下界面;

选择app store 点击continue;
选择app id (我们要为那个app 创建描述文件就选择那个app);

点击continue,选择根证书;

点击continue,开始填写描述文件的名称;

点击continue,会弹出如下界面,点击download开始下载描述文件(可以多次下载,其他电脑也可以下载使用);
下载描述文件;

双击描述文件,将描述文件导入到xcode中以供使用;

然后点击done完成操作,如下是创建好的描述文件;

现在开始配置在xcode上面编写的代码文件;
点击xcode选择要上架的app的xcode工程,打开工程,在Info.plist文件中设置bundle id,这里的bundle identifier要和我们创建的app id中的bundle id一样,Bundle display name 就是app的名字;

点击工程名称,选择build setting;

搜索code signing;

开始设置code signing,设置发布的描述文件;

如果在选择开发者账户是发现,没有我们要选择的,选中xcode软件,点击左上角的xcode选项;

弹出如下界面,选择preferences 选项;

选中accounts ,开始添加开发者账户;


如果选择了开发者账户,但无法选择描述文件;
同样是点击xcode---- preferences ----account 然后点击对应的开发者账户---点击view details;

然后弹出如下界面;

在provisioning profiles 找到我们的描述文件,点击右键选择show in finder,将原来的删除掉,然后双击我们下载的描述文件,选中工程明选中targets下面的另一个工程(功成名称和上一个相同),同样设置开发者账户和描述文件;

然后设置程序运行时的状态(原来是调试状态的要改成发布状态);
点击product 选择 schems;


会弹出如下界面,设置run和archive;

点击targets下面的工程名,选择general,设置版本号,以及开发者账户;

设置完成之后开始打包app,准备上线,点击xcode上面的模拟器选择按钮,选中generic ios device(不选中这个无法进行打包);

现在开始打包;
点击product ---选中Archive开始打包;

出现如下错误,只需按照上面说的删除描述文件,再重新导入描述文件;

出现如下问题是因为xcode中的有些文件没有根据Info.plist的改变而改变,解决方法如下:


然后再次点击archive开始打包,在打包过程中需要授权,点击允许,检查完成之后会弹出如下界面;

然后点击export开始打包,点击export之后会弹出如下界面;

我们选择第一个选项,弹出这个界面直接点击choose;


点击export,会在桌面上生成一个:

这样我们就打包完成,在打包完成之后我们要查看一下包里面的某些内容是否正确,不要退出打包界面,直接点击打包界面的包右键选择在文件夹中显示(show in finder) ,再右键选中包,点击显示包内容,查看里面的Info.plist点击打开;

现在开始构建版本;
登录到开发者账户:网址https://developer.apple.com;
选择account 然后登陆开发者账户;

选中 itunes connect,跳转到itunes connect 界面登陆之后,弹出如下界面:
选择我的app;

会跳转到如下界面;

点击加号开始创建app;

弹出如下界面;

套装ID的选择是根据刚才我们打包是工程的bundle id 是和我们的哪一个app id 中设置的bundle id相同,我们就选择哪一个,填写完成之后点击创建,会出现如下界面:

现在我们就可以开始构建版本了,选择xcode软件 ----点击xcode ---选择 open developer tool ,再选择 application loader;

确定登陆的账号是否正确,不正确就注销当前账号,再登陆(确保当前账号就是我们创建app id的账号),然后点击选取,选取我们之前打包好的app;


成功之后出现这个界面;

表明版本构建成功.直接点击下一步,开始鉴定;

鉴定完成界面;

至此我们已经完成打包和版本构建;
现在我们开始准备上架:
再次登陆到开发者账户上,网址https://developer.apple.com;
点击 iTunes connect,进入如下界面:

再次选中我的app ,我们会看到我们创建的app ,点击我们创建的app;

点击我们创建的app,将出现如下界面:

我们开始填写app的信息,将上述的链接和类别填写完成之后点击保存;

设置完成之后点击1.0准备提交;

首先设置的是app在不同手机上面的页面图片;

可以使用模拟器截屏也可以使用真机截屏,要保证图片的尺寸,否则添加不上去,之后开始填写相应的数据;

构建版本:

网友评论