New Apns Provider API and PHP

APNs Provider API HTTP/2 using php, curl causes error on multiple push notifications sent

I tried your code and it works right on my machine. Nevertheless I see some differences between our verbose logs. The log of Try 1 is identical, but the log in Try 2 has some differences, this is mine:

...
Try 2 ================================================
* Found bundle for host api.development.push.apple.com: 0x7fe1b380e730 [can multiplex]
* Re-using existing connection! (#0) with host api.development.push.apple.com
* Connected to api.development.push.apple.com (17.172.238.203) port 443 (#0)
* Using Stream ID: 3 (easy handle 0x7fe1b305da00)
> POST /3/device/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX HTTP/1.1
Host: api.development.push.apple.com
Accept: */*
apns-topic: it.XXX.XXXXX
Content-Length: 43
Content-Type: application/x-www-form-urlencoded

* We are completely uploaded and fine
< HTTP/2.0 200
< apns-id:XXXXXXXXXXXXXXXXX
<
* Connection #0 to host api.development.push.apple.com left intact

I don't see in your log the text "Re-using existing connection!" ...

EDIT

The solution seems to be to downgrade curl to 7.47.1

Issuse with send notification with APNS HTTP/2 from PHP

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.



Related Topics



Leave a reply



Submit