1

Recent my certificate for push notification time out so I must create new certificate Universal Push Notification Client SSL Certificate. But when I update this my certificate, my php server can't push notification, Apple return error

Unable to set private key file

Seems problem come with recent update of 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.

Anyone faced with it can help me. If have sample I will very appreciate. Thank alot!

vien vu
  • 4,277
  • 2
  • 17
  • 30

1 Answers1

0

Finally I found out problem. Each certificate have an identity, so with new certificate have new identity. If you don't check it in code PHP, Apple will return error above. If anyone work with it and face same error, they should check it.

vien vu
  • 4,277
  • 2
  • 17
  • 30
  • Hi. Can you help me about how to implement sending notification with APNs http/2 from php? Some snippets or so... Thank you. – Jim75 Jan 13 '16 at 07:49
  • 2
    easyapns.com does not have any code for HTTP/2 that I can see. It's all the old interface. – Gargoyle May 18 '16 at 05:39