1.打开应用程序—>【钥匙串访问】—>【证书助理】—>【从证书办法机构请求证书】

2.在【用户电子邮件地址】填入apple账户用的邮箱,选择【存储到磁盘】,点击【继续】,会在磁盘保存一个【CertificateSigningRequest.certSigningRequest】文件

3.登录:https://developer.apple.com/account/ios/certificate/certificateList.action?type=distribution 进入【Certificates, Identifiers & Profiles】画面
重则【Certificates】的【Development】,选择【+】。


选择【iOS App Development】,一路【Continue】下去,然后到了如下页面:

点击【Choose File...】选择前面磁盘保存的【CertificateSigningRequest.certSigningRequest】文件。
点击【Generate】就生成成功证书文件了。
在下面的地方下载该证书文件:

下载到磁盘,如下:

双击安装证书。证书安装完成。
4.在【Certificates, Identifiers & Profiles】画面上选择:

选择添加你的移动设备:填入【Name】和【UDID】

如果要添加多个设备,可以选择:

文件格式可以点【Download sample files】查看。
5.在【Certificates, Identifiers & Profiles】画面上选择:

添加你的app信息

这里填入app名字

这里填入你的app的Bundle ID
点击【Continue】
5.在【Certificates, Identifiers & Profiles】画面上选择:

然后:选择

然后选择你的appID

点击【Continue】
6.去下载并安装

至此,大功告成
7.发布的配置跟调试类似,只是选择【Development】的地方都选择为【Distribution】,比如:
选择:

选择:

一路【Continue】下去
就有如下画面:

点击【Choose File...】选择前面磁盘保存的【CertificateSigningRequest.certSigningRequest】文件。
点击【Generate】就生成成功发布的证书文件了。
在下面的地方下载该证书文件:

安装就可以了。
选择:

然后【+】,如下选择:注意,企业版证书内部测试的话,要选择【In House】

点击【Continue】就。
选择:

点击【Continue】就可以了
然后去下载并安装:

发布的也ok了
。