如何生成有效的APNS证书(或.p12)在GCM使用适用于iOS? [英] How to generate valid APNS Certificate (.p12) for use in GCM for iOS?

查看:485
本文介绍了如何生成有效的APNS证书(或.p12)在GCM使用适用于iOS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图对iOS平台的谷歌云消息示例应用程序。 <一href=\"https://developers.google.com/cloud-messaging/ios/start\">https://developers.google.com/cloud-messaging/ios/start

I am trying Google Cloud Messaging sample app for iOS platform. https://developers.google.com/cloud-messaging/ios/start

要生成需要GoogleServices-Info.plist中APNS开发和生产证书(PKCS#12文件格式)。
我在MAC钥匙串访问创建.p12文件(两者捆绑开发APNS证书和私钥)。

To generate GoogleServices-Info.plist APNS development and production certificates are needed (PKCS#12 file format). I have created .p12 file in MAC KeyChain Access (bundling both APNS dev certificate and private key).

但上传.p12文件时,它说,这是格式无效
(该证书必须是有效的PKCS12文件)。

But when uploading the .p12 file, it says it is not in valid format (The certificate must be a valid PKCS12 file).

推荐答案

下面是我的解决方案,无需终端!

Here's my solution, without the terminal !


  • 删除您的实际证书(在钥匙串):苹果IOS开发推送服务&放大器; 苹果生产IOS推送服务

  • delete your actual certificate ( in Keychain ) : "Apple Development IOS Push Service" & "Apple Production IOS Push Service"

去苹果开发者,标识符,应用ID,选择YourApp,编辑,推送通知和下载两证(DEV&安培;督促)

Go to Apple Developer, Identifiers, App IDs, Select "YourApp", Edit, Push Notification and download the 2 certificates (dev & prod)


  • 导入钥匙扣这些证书2

  • import these 2 certificates in Keychain

在钥匙串,进入我的证书,找到苹果IOS开发推送服务&放大器; 苹果生产IOS推送服务,点击箭头展开证书+键

in Keychain, go to "My Certificates", find the "Apple Development IOS Push Service" & "Apple Production IOS Push Service", click on the arrow to expand the Certificate + Key

选择这两个证书+键,右键单击导出2项,你有你的.p12有效证件准备上传到GCM服务

Select both the the Certificate + Key, Right click "Export 2 items", you have your .p12 valid certificate ready for upload to GCM Services

此链接帮助我:<一href=\"http://faq.appaloosa-store.com/knowledgebase/articles/61785-how-to-generate-push-notification-p12-file\">http://faq.appaloosa-store.com/knowledgebase/articles/61785-how-to-generate-push-notification-p12-file

这篇关于如何生成有效的APNS证书(或.p12)在GCM使用适用于iOS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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