Firebase:无法上传生产APN证书 [英] Firebase: Cannot upload production APNs certificate

查看:216
本文介绍了Firebase:无法上传生产APN证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在测试TestFlight中的一个应用程序,并且需要一个生产APNs证书才能测试Firebase中的通知。

我已经执行了这个视频中的所有步骤并成功配置了开发APN证书:
https://www.youtube.com/watch ?v = LBw5tuTvKd4



我也检查了Firebase支持指南后面的步骤。虽然我注意到,自从编写本指南后,Apple Developer网站发生了一些变化:
https://firebase.google.com/docs/cloud-messaging/ios/certs#configure_an_app_id_for_push_notifications



我已经生成了一个生产APN证书在developer.apple.com使用相同的方法作为开发证书,但是当我尝试上传.p12文件到Firebase,它给了我以下错误:

证书环境不匹配,确保你有正确的开发或生产APNS证书。



我肯定上传了从生产APNS证书生成的.p12 ,还有什么我需要做的生产证书吗?解决方案

解决方案

我所犯的错误是我在Keychain Access中导出证书的私钥部分,而不是证书部分。只要我重新导出.p12使用正确的项目 - 它的工作。


I am currently testing an app in TestFlight and need a production APNs certificate in order to test Notifications in Firebase.

I have followed all of the steps in this video and successfully configured the development APNs certificate: https://www.youtube.com/watch?v=LBw5tuTvKd4

I've also checked that my steps following the Firebase support guide. Although I note that the Apple Developer site has changed slightly since this guide was written: https://firebase.google.com/docs/cloud-messaging/ios/certs#configure_an_app_id_for_push_notifications

I have generated a production APNs certificate at developer.apple.com using the same method as the development certificate but when I try to upload the .p12 file to Firebase, it gives me the following error:

"The certificate environment did not match. Ensure that you got the right development or production APNS certificate."

I'm definitely uploading a .p12 generated from a production APNS certificate, is there something else I need to do for a production certificate?

解决方案

Solved. The mistake I was making was that I was exporting the "private key" part of the certificate in Keychain Access instead of the "certificate" part. As soon as I re exported the .p12 using the correct item - it worked.

这篇关于Firebase:无法上传生产APN证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆