苹果开发——Xcode证书生成、设置及应用
时间:2014-05-05 11:38:03
收藏:0
阅读:515
原地址:http://zengwu3915.blog.163.com/blog/static/2783489720137483422530/
开发环境: Mac OS lion 10.8.2、Xcode 4.5.1
1. 点击应用程序 -> 实用工作 -> 钥匙串

2. 在菜单栏中依次选择:钥匙串访问 -> 偏好设置 -> 证书选项卡,下面两项全部选择关闭

3. 生成证书请求:钥匙串访问 -> 证书助理 -> 从证书颁发机构请求证书

4. 输入两个电子邮件地址和常用名称。电子邮件地址是你注册AppleID。
a) 常用名称输入你在苹果网站注册的名称,其它名称没试过,不知道行不行。
b) 选择“存储到磁盘”。


c) 点存储后


5、 生成Certificates证书(此处要有苹果开发者账号,$99/年)
a) 登录开发者中心:
https://developer.apple.com/ios/manage/overview/index.action

b) 选择左侧的Certificates标签,再选择右侧的:Request certificate
,在弹出的页面框最下端选择文件,上传刚刚生成的证书请求
(CertificateSigningRequest.certSigningRequest),提交之后会出现Download下载按钮。

6、设置Devices
a) 在页面的左侧选 devices 添加你的设备
a) 输入你的手机名称,(可以在手机上通用?关于本机,查看手机名称)
b) 输入你的UDID
(连接你的手机到电脑,打开Xcode?window?organizer,在打开的窗口中选择Devices)如图:最下面一行identifier就是UDID
7、设置APP IDs
a) 在页面的左侧选APP IDs,
b) 在页面右侧选择 New APP ID ,打开页面如下图,
c) 输入一个APPID描述符,这个描述符没有实际意义,就是描述你的这个APP ID
是做什么用的,如“MyDebug”,在下面一个框中输入你的应用程序ID,通常以“com.英文域名.*”这种方式命名。设置好之后提交。
注意!在这里要详细说明一下,"*"号表示所有程序都可以用此证书编译,如果后面不用*号而是用具体的名称那么这个证书只能用于和这个名称相同的程序。但是如果需要编译带发送push通知消息或需要游戏中心服务的程序必须设置成与你的程序名称相同的名子,不能用"*"。


9、设置Pass type IDs
a) 在页面的左侧选Pass type IDs,分别输入一个名称和ID,名称随便填,ID必须以pass. 开头,加域名
b) 提交之后选择 configure 来配制。
c) 点完 configure 后可能还需要点一次,相当于刷新了。

10、生成Profile
a) 在页面的左侧选Provisioning 分别设置下面几项,ProFile Name
就是这个证书的名子,如:“MyDebug”,APP ID如果都是唯一的话,没有其它可以选择。
b) 提交之后回到Certificates 标签页


11、下载AppleWWDRCA.cer证书
a) 打开Certificates 标签页,下载AppleWWDRCA.cer证书,如图


12、下载 ios_development.cer证书安装,如下图
安装完之后会出现下面如图两个证书,此处为了清楚,删除了上面生成的两个密钥,在自己机器上千万别删除。

打开Pass Type标签页下载安装。
14 、下载用于编译的证书
a) 打开Provisioning 下载,这个证书不要双击安装。安装方法如下:
b) 连接你的iPhone到电脑;
c) 将你的Xcode图标拖到Doc上;
d) 拖动你的证书到Xcode上立即释放。
e) 在organizer窗口Devices标签中下面两个位置就会出现你的证书名称。并且
Status状态一定会绿色。到次证书就设置完成,下面继续说使用证书。

a) 在左侧中找到xxxx-info.list文件,设置右侧“Bundle
identifier”的值,将原来的xxxx.${PRODUCT_NAME:rfc1034identifier}
替换为你在页面里设置的值如com.英文域名.${PRODUCT_NAME:rfc1034identifier1}
b) 选中左侧的工程图标,如下图所示位置设置你的证书,如右侧红线部分。


评论(0)