创建 Apple 推送服务而不是 Apple 生产 iOS 推送服务

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34431337/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 08:27:53  来源:igfitidea点击:

Apple Push Services created instead of Apple Production iOS Push Services

ioscertificateapple-push-notifications

提问by YogevSitton

I'm trying to create a certificate for Production iOS Push Services. Instead I get an Apple Push Services. How can I create a dedicated Apple Production iOS Push Servicescertificate?

我正在尝试为生产 iOS 推送服务创建证书。相反,我得到了一个Apple Push Services。如何创建专用的Apple Production iOS Push Services证书?

The top certificate is what I used to get. The bottom one is what I now get.

顶级证书是我以前拿到的。最下面的一个是我现在得到的。

enter image description here

在此处输入图片说明

I use Pusher application to test my push notifications certificate and it cannot read the p12 of the new Apple Push Services.

我使用 Pusher 应用程序来测试我的推送通知证书,但它无法读取新 Apple Push Services 的 p12。

回答by Paulw11

Apple have changed the name of the certificate that is issued. You can now use the same certificate for both development and production. While you can still request a development only certificate you can no longer request a production only certificate.

Apple 已更改颁发的证书的名称。您现在可以为开发和生产使用相同的证书。虽然您仍然可以申请仅限开发的证书,但您不能再申请仅限生产的证书。

Since the purpose of the certificate is no longer production only Apple has changed the common name to Apple Push Services. The functionality of the certificate is not affected.

由于证书的目的不再是生产,只有 Apple 将通用名称更改为 Apple Push Services。证书的功能不受影响。

Unfortunately services that validate the CN of the certificate may reject this new name. There is nothing you can do about this until the service updates its verification code. For example, Parse.com had this issue a few days ago but their verification code has now been updated and they will now accept the new certificate name.

不幸的是,验证证书 CN 的服务可能会拒绝这个新名称。在服务更新其验证码之前,您无能为力。例如,Parse.com 几天前就有这个问题,但他们的验证码现在已经更新,他们现在将接受新的证书名称。

回答by u5755873

Apple Change Apple Production IOS Push Services cert name to Apple Push Services if you used pushsharp , you need go to github https://github.com/v-tsymbalistyi/PushSharpdownload zip and used visual studio recombile because the code change if (production && !subjectName.Contains("Apple Production IOS Push Services") && !subjectName.Contains("Apple Push Services")) throw new ArgumentException("You have selected the Production server, yet your Certificate does not appear to be the Production certificate! Please check to ensure you have the correct certificate!");

Apple 将 Apple Production IOS Push Services 证书名称更改为 Apple Push Services 如果您使用 pushsharp ,则需要到 github https://github.com/v-tsymbalistyi/PushSharp下载 zip 并使用 Visual Studio recombile 因为代码更改 if (production && !subjectName.Contains("Apple Production IOS Push Services") && !subjectName.Contains("Apple Push Services")) throw new ArgumentException("您选择了生产服务器,但您的证书似乎不是生产证书!请检查以确保您拥有正确的证书!");

            if (!production && !subjectName.Contains("Apple Development IOS Push Services") && !subjectName.Contains("Pass Type ID"))
                    throw new ArgumentException("You have selected the Development/Sandbox (Not production) server, yet your Certificate does not appear to be the Development/Sandbox certificate!  Please check to ensure you have the correct certificate!");            

and you just copy PushSharp.Apple.dll to server then everything OK

你只需将 PushSharp.Apple.dll 复制到服务器然后一切正常

回答by S. Karthik

  1. Login Apple Developer Account.
  2. In Member Center -> click Certificates, Identifiers & Profiles
  3. Choose IOS apps
  4. In Certificates -> click add new(+)
  5. There you can see Apple Push Notification service SSL (Sandbox) [for development] and Apple Push Notification service SSL (Sandbox & Production)
  6. To click on continue , choose Appid(bundle id)
  7. Need to continue. This have the demo to generate csr
  8. Add CSR file
  9. Then it generate APNs. Put the name for it.
  1. 登录苹果开发者账号。
  2. 在会员中心 -> 点击 Certificates, Identifiers & Profiles
  3. 选择IOS应用
  4. 在证书 - >点击添加新(+)
  5. 在那里你可以看到 Apple Push Notification service SSL (Sandbox) [for development] 和 Apple Push Notification service SSL (Sandbox & Production)
  6. 要单击继续,请选择 Appid(bundle id)
  7. 需要继续。这有生成 csr 的演示
  8. 添加CSR文件
  9. 然后它生成APN。为它命名。

Note: You can generate APNS for Development through Apple Push Notification service SSL and Production for Apple Push Notification service SSL (Sandbox & Production).

注意:您可以通过 Apple Push Notification service SSL 和 Production for Apple Push Notification service SSL (Sandbox & Production) 生成用于开发的 APNS。

回答by Avijit Nagare

Then click on you App Id in developer account App ID -> Edit -> you will get development and production ssl certificate mode.

然后在开发者账号 App ID 中点击你的 App Id -> Edit -> 你会得到开发和生产 ssl 证书模式。

Then upload your CSR file=> download aps_production.cer

然后上传您的 CSR 文件=> 下载 aps_production.cer

Then use Thislink to create PEM file (Which used on server)

然后使用链接创建 PEM 文件(在服务器上使用)

There is one simplepush.php file you can test from your mac cmd.

您可以从您的 mac cmd 中测试一个 simplepush.php 文件。

Hope this will help.

希望这会有所帮助。