"XXX"has one iOS Distribution certificate but its private key is not installed. Contact the creat...

在打包或者上传app的时候,出现了该问题。"XXX"has one iOS Distribution certificate but its private key is not installed. Contact the creator of this certificate to get a copy of the private key 

问题截图

解决方法:

登录Apple Developer,新建Certificates证书,首先要从钥匙串访问中请求证书:



填写邮箱和名称,获得证书请求文件。



填写时,名称不可忽略,不然虽然从钥匙串导出证书请求文件没有问题,但是传到Apple Developer 中用于创建Certificates证书时,会出现An error occurred.Invalid Certificate的错误,原因就是导出证书请求文件时没有填写常用名称。错误提示如下:

得到证书请求文件后,在登录Apple Developer,新建Certificates证书:



选择刚才钥匙串生成的证书请求文件,点击继续,生成证书,下载,双击安装,安装后会在钥匙串访问中生成新文件。然后重新打包,如果还是出现该问题,点击"Manage Certificates",出现刚才新安装的证书,点击OK。就能解决。

你可能感兴趣的:("XXX"has one iOS Distribution certificate but its private key is not installed. Contact the creat...)