生成用于设置Apple Push Notifications的.pem文件 [英] Generate .pem file used to set up Apple Push Notifications

查看:98
本文介绍了生成用于设置Apple Push Notifications的.pem文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试并尝试生成.pem文件,每次都从客户帐户生成证书,然后使用终端生成.pem文件,但这没有用.任何人都可以逐步进行操作吗?

I tried and tried to generate a .pem file, every time generating certificates from the client's account and then generating the .pem file using the terminal, but it's of no use. Can anyone give a step-by-step procedure?

推荐答案

要为您的iOS应用启用推送通知,您需要创建并上传Apple推送通知证书(.pem文件)给我们,以便我们能够代表您连接到Apple Push Server.

To enable Push Notification for your iOS app, you will need to create and upload the Apple Push Notification Certificate (.pem file) to us so we will be able to connect to Apple Push Server on your behalf.

( 具有更新的屏幕截图的更新版本这里 )

第1步:登录iOS Provisioning Portal,单击左侧导航栏上的证书".然后,单击"+"按钮.

Step 1: Login to iOS Provisioning Portal, click "Certificates" on the left navigation bar. Then, click "+" button.

第2步:选择分发"部分下的Apple Push Notification服务SSL(生产)选项,然后单击继续"按钮.

Step 2: Select Apple Push Notification service SSL (Production) option under Distribution section, then click "Continue" button.

步骤3:选择要用于BYO应用程序的应用程序ID(如何创建应用程序ID),然后单击继续"进入下一步.

Step 3: Select the App ID you want to use for your BYO app (How to Create An App ID), then click "Continue" to go to next step.

步骤4:按照关于创建证书签名请求(CSR)"步骤创建证书签名请求.

Step 4: Follow the steps "About Creating a Certificate Signing Request (CSR)" to create a Certificate Signing Request.

补充Apple提供的说明.以下是一些其他屏幕截图,可帮助您完成所需的步骤:

To supplement the instruction provided by Apple. Here are some of the additional screenshots to assist you to complete the required steps:

第4步补充屏幕截图1:导航到Mac上钥匙串访问"的证书助手.

Step 4 Supplementary Screenshot 1: Navigate to Certificate Assistant of Keychain Access on your Mac.

第4步补充屏幕快照2:填写证书信息.点击继续.

Step 4 Supplementary Screenshot 2: Fill in the Certificate Information. Click Continue.

第5步:上传在第4步中生成的".certSigningRequest"文件,然后单击生成"按钮.

Step 5: Upload the ".certSigningRequest" file which is generated in Step 4, then click "Generate" button.

步骤6:单击完成"完成注册,将刷新iOS Provisioning Portal页面,如下图所示:

Step 6: Click "Done" to finish the registration, the iOS Provisioning Portal Page will be refreshed that looks like the following screen:

然后单击下载"按钮以下载您刚刚创建的证书(.cer文件). -双击下载的文件,将证书安装到Mac上的Keychain Access中.

Then Click "Download" button to download the certificate (.cer file) you've created just now. - Double click the downloaded file to install the certificate into Keychain Access on your Mac.

步骤7:在Mac上,转到钥匙串",查找刚刚安装的证书.如果不确定哪个证书是正确的,则应以"Apple Production IOS推送服务:"开头,然后是应用程序的捆绑软件ID.

Step 7: On your Mac, go to "Keychain", look for the certificate you have just installed. If unsure which certificate is the correct one, it should start with "Apple Production IOS Push Services:" followed by your app's bundle ID.

步骤8:展开证书,您应该看到带有您的姓名或公司名称的私钥.通过使用键盘上的选择"键选择两个项目,右键单击(或使用cmd单击鼠标(如果使用单键鼠标),然后选择导出2个项目",如下所示:

Step 8: Expand the certificate, you should see the private key with either your name or your company name. Select both items by using the "Select" key on your keyboard, right click (or cmd-click if you use a single button mouse), choose "Export 2 items", like Below:

然后将名称为"pushcert.p12"的p12文件保存到桌面-现在将提示您输入密码进行保护,您可以单击Enter跳过该密码或输入所需的密码.

Then save the p12 file with name "pushcert.p12" to your Desktop - now you will be prompted to enter a password to protect it, you can either click Enter to skip the password or enter a password you desire.

步骤9:现在最困难的部分-在Mac上打开终端",然后运行以下命令:

Step 9: Now the most difficult part - open "Terminal" on your Mac, and run the following commands:

cd
cd Desktop
openssl pkcs12 -in pushcert.p12 -out pushcert.pem -nodes -clcerts

第10步:从桌面删除pushcert.p12,以避免将其错误上传到自己构建"区域.在Mac上打开终端",然后运行以下命令:

Step 10: Remove pushcert.p12 from Desktop to avoid mis-uploading it to Build Your Own area. Open "Terminal" on your Mac, and run the following commands:

cd
cd Desktop
rm pushcert.p12

步骤11-新的AWS更新:创建新的pushcert.p12提交给AWS SNS.双击新的pushcert.pem,然后仅导出绿色高亮的那一个.

Step 11 - NEW AWS UPDATE: Create new pushcert.p12 to submit to AWS SNS. Double click on the new pushcert.pem, then export the one highlighed on the green only.

信用: AWS新更新

现在,您已经成功创建了Apple Push Notification证书(.p12文件)!稍后,您将需要将此文件上传到我们的自己构建"区域. :)

Now you have successfully created an Apple Push Notification Certificate (.p12 file)! You will need to upload this file to our Build Your Own area later on. :)

这篇关于生成用于设置Apple Push Notifications的.pem文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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