使用来自 PHP 的 APNS HTTP/2 发送通知的问题

Issuse with send notification with APNS HTTP/2 from PHP

最近我的推送通知证书超时,因此我必须创建新证书 Universal Push Notification Client SSL Certificate。但是当我更新我的证书时,我的 php 服务器无法推送通知,Apple return 错误

Unable to set private key file

最近的 Apple 更新似乎出现了问题。

APNs Provider API

Apple Push Notification service includes the APNs Provider API that allows you to send remote notifications to your app on iOS, tvOS, and OS X devices, and to Apple Watch via iOS. This API is based on the HTTP/2 network protocol. Each interaction starts with a POST request, containing a JSON payload, that you send from your provider server to APNs. APNs then forwards the notification to your app on a specific user device.

任何遇到它的人都可以帮助我。如果有样品,我将不胜感激。非常感谢!

终于找到问题了。每个证书都有一个身份,因此有了新证书就有了新的身份。如果你不在代码PHP中勾选,苹果会出现上面的return错误。如果有人使用它并遇到同样的错误,他们应该检查它。