nfilin / apns-http2

MIT License
14 stars 9 forks source link

APNs Response status 400 and 'MissingTopic' reason #5

Open arcoslwm opened 7 years ago

arcoslwm commented 7 years ago

Switching to production mode (sandbox = false and the certificate) i get the following response:

[response] => Nfilin\Libs\ApnsHttp2\CurlResponse Object ( [reason] => MissingTopic [timestamp] => [status] => 400 )

reading the docs i think it may be related to:

The appropriate encoding to employ for the apns-id, apns-expiration, and apns-collapse-id request headers differs depending on whether it is part of the initial or a subsequent POST operation, as follows: The first time you send these headers, encode them with incremental indexing to allow the header names to be added to the dynamic table Subsequent times you send these headers, encode them as literal header fields without indexing.

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html

Someone can guide me?, if I am doing something wrong or how to solve this?. In sandbox mode works fine.

in this thread APS : missing topic mentions differences between development and production certificates

arcoslwm commented 7 years ago

Sorry, is a version problem. the commit 'bfdcd9a32deb338482889bef37d81ca64f46499e' solve the problem but i installed via composer the v1.0.1