Tutorial on creating cloud packaged private key certificates and certificate profile files

When we use H5 development tools, such as hbuilderx or apicloud, for cloud packaging, we need to provide a private key certificate in p12 format and a certificate profile file in mobileprovision format. So how to create these two files?

Apple's official method requires the use of a Mac computer to create, and the creation process is also relatively complicated. Considering all users, we will not introduce the method of using a Mac computer to create it. Here I will describe the general creation method.

First, we need to log in to the Apple Developer Center: https://developer.apple.com. If you have not registered as an Apple developer, you can refer to this article to register as an Apple developer first:

https://www.yunedit.com/xueyuan/jx/applereg

Then, the following is the application method for p12 private key certificate:

  1. Log in to the Apple developer website mentioned above, enter the certificates menu, and then click the blue plus sign on the right to start creating the cer certificate. In the first step of creation, it will prompt us to select the type of certificate. There are many types of certificates, including push certificates, publishing certificates, etc. Here we need to choose the ios distribution ad hoc and app store type of certificate. We cannot choose other types. Do not choose the apple type or dev type.

 

  1. In the process of creating a cer certificate, in the second step it will ask us to upload a csr file, as shown below:

  1. But we don’t have this csr file, what should we do? At this time, you can use Banana Cloud Editor’s tools to create:

https://www.yunedit.com/createcert

Log in to the Banana Cloud Editor console, create a csr file, and then download the csr file to your local computer. As shown below:

  1. Go back to the Apple developer website and continue to upload the csr file to generate a cer certificate, and then download the cer certificate to your local computer.

  1. Return to Banana Cloud Editor, as shown below, upload this cer file, the button to generate p12 certificate will light up, and the p12 certificate can be generated.

After completing the above five steps, you can generate the p12 private key certificate. Now the certificate profile file has not been created.

The following is the generation process of the certificate profile file:

  1. 登录苹果开发者网站,点击Identifiers菜单,假如还没有创建identifier(又称appId,下面都称为appId), 则先创建appId, 创建appId的时候,这个appId需要跟我们打包的时候的包名一致,比如是下面这种格式的包名:

com.xxxxxxxxxx.yyyyy

界面如下图:

  1. 创建完appId后,进入profiles菜单,开始创建证书profile文件,首次创建的时候,我们先创建app store类型的练练手,后面的两步我们再教大家如何创建测试类型的profile。如下图,创建的时候,它会提示我们选择我们刚才创建的appId和cer证书,这里选择要慢一点选,假如选错了打包的时候就会提示不匹配。

  1. 前两步的步骤,你已经可以成功创建出app store类型的profile文件了。假如你想创建真机测试类型的profile,还需要做下面这两步:要点击devieces菜单,创建device(测试设备),创建device的时候,要添加测试设备(iphone)的udid,这个udid,你可以使用香蕉云编右上角的获取udid的工具来获取:

  1. 假如要创建测试类型的profile,在第2步创建profile的时候要选择ad hoc类型,不要选择app store类型,创建流程几乎一样,但会多一步选择devices的步骤,这些devices在第3步的时候已经创建,直接选择即可。

p12私钥证书文件和证书profile文件的创建流程已经全部描述完毕,感谢大家。

Guess you like

Origin blog.csdn.net/h5xiaoyu/article/details/129556784