1、打开钥匙串,依次选择:钥匙串-证书助理-从证书颁发机构请求证书
![](https://i-blog.csdnimg.cn/blog_migrate/7ec809b0e3bb69432dd62b831527765e.webp?x-image-process=image/format,png)
2、填写一个邮箱地址,选择“存储到磁盘”,点击继续,完成了。
![](https://i-blog.csdnimg.cn/blog_migrate/ac5c4d7e0048db9adb37340302513922.webp?x-image-process=image/format,png)
申请成功后的文件:
![](https://i-blog.csdnimg.cn/blog_migrate/87d6be548381f616beb65e63d0819b56.webp?x-image-process=image/format,png)
3、登录苹果开发者中心(https://developer.apple.com/account)
步骤1:下面罗列我们iOS开发常用的证书类型:发布证书
![](https://i-blog.csdnimg.cn/blog_migrate/c75421a92313ee67642d7ce5917125b0.webp?x-image-process=image/format,png)
![](https://i-blog.csdnimg.cn/blog_migrate/29c47ea77ba94f51bb14c554d01986bf.webp?x-image-process=image/format,png)
![](https://i-blog.csdnimg.cn/blog_migrate/dcfdd228ccb0d60a99b47def3f36167d.webp?x-image-process=image/format,png)
上传我们之前建好的CSR文件
![](https://i-blog.csdnimg.cn/blog_migrate/3e9cec9247f8325b4b17e1edf5f0667b.webp?x-image-process=image/format,png)
点击download下载证书
恭喜你,到此为止,你完成了证书的申请,简单吧
步骤2:创建appID
![](https://i-blog.csdnimg.cn/blog_migrate/6abcc89f19f427d8812ddf526a050002.webp?x-image-process=image/format,png)
![](https://i-blog.csdnimg.cn/blog_migrate/48bba5b727191c414c5594015400051c.webp?x-image-process=image/format,png)
![](https://i-blog.csdnimg.cn/blog_migrate/667f397afb13a37bcb7ad8c724a2ac3e.webp?x-image-process=image/format,png)
![](https://i-blog.csdnimg.cn/blog_migrate/88a4dde89873180e96dd66d9b2c8ae60.webp?x-image-process=image/format,png)
然后done,,就完成了bundleID的创建
步骤3:授权文件申请(Provisioning Profile)
![](https://i-blog.csdnimg.cn/blog_migrate/39d07171dbb17534692d18d917f31260.webp?x-image-process=image/format,png)
![](https://i-blog.csdnimg.cn/blog_migrate/2d83fd1743523b23de519147fb3f00b2.webp?x-image-process=image/format,png)
选择关联App ID (也是我们刚刚创建的bundleID),一定要选择对
![](https://i-blog.csdnimg.cn/blog_migrate/8b4dec33faac5a1164cf37cf97db4da0.webp?x-image-process=image/format,png)
然后continue
选择关联的证书(我们步骤1创建的证书),一定要选择对,可以看日期选择
![](https://i-blog.csdnimg.cn/blog_migrate/949b1825c5bda342ad9db190cc7e9c34.webp?x-image-process=image/format,png)
![](https://i-blog.csdnimg.cn/blog_migrate/737a04be7178e06874637c7b3cc075a6.webp?x-image-process=image/format,png)
![](https://i-blog.csdnimg.cn/blog_migrate/cd0607ad6fe612c0f76b425640530024.webp?x-image-process=image/format,png)
注意!!!!!!!!:然后分别点击下载的两个证书让他生效.
4、出工程包
步骤1:配好证书
![](https://i-blog.csdnimg.cn/blog_migrate/8827b51cbf4e4b1348627bb70413199e.webp?x-image-process=image/format,png)
步骤2:配好bundleID和账号team
![](https://i-blog.csdnimg.cn/blog_migrate/db912cf638b0245d4100df8cb32c3a43.webp?x-image-process=image/format,png)
下面team对应的账号是上架的账号
![](https://i-blog.csdnimg.cn/blog_migrate/14dac0a4694807dd38adf00521bdc8fc.webp?x-image-process=image/format,png)
出包前要检查以下东西
![](https://i-blog.csdnimg.cn/blog_migrate/d1f2029d7671364d752bc6c99fd6a89f.webp?x-image-process=image/format,png)
![](https://i-blog.csdnimg.cn/blog_migrate/7cede646000213e359a4b486f15f225a.webp?x-image-process=image/format,png)
然后就选择product - archive
![](https://i-blog.csdnimg.cn/blog_migrate/232124bc0c82c2ebc7f54efbf318ce45.webp?x-image-process=image/format,png)
![](https://i-blog.csdnimg.cn/blog_migrate/30f98c1521e8551d67efb9de406bf04d.webp?x-image-process=image/format,png)
![](https://i-blog.csdnimg.cn/blog_migrate/ebdc49f676e2a5ab04992329da009019.webp?x-image-process=image/format,png)
![](https://i-blog.csdnimg.cn/blog_migrate/7fedb3d2fc3f146f4e5e7bf4a8a9ec0c.webp?x-image-process=image/format,png)
觉得有用的话打赏一下!!!!!!!!哈哈