P
P
Pavel Makukha2015-12-02 14:49:08
Objective-C
Pavel Makukha, 2015-12-02 14:49:08

Why doesn't Push Notification work on production?

  1. AppId contains 2 certificates for push notifications (development and production respectively)
    2e4ffa457e984171865f85c01daa233d.png
  2. Certificates and .pem files were created according to the manual
  3. Development-Push sent through gateway.sandbox.push.apple.com:2195 come out wow.
  4. Production-Push sent via gateway.push.apple.com:2195 sent but not received
    [2015-12-02 09:56:56][INFO] Added receiver cbd9a7680fc83b7fbcd7f91014107750a6f20c21ef3408c5c38ae92ba37c4f3a
    [2015-12-02 09:56:56][INFO] INFO: Trying tls://gateway.push.apple.com:2195...
    [2015-12-02 09:56:58][INFO] INFO: Connected to tls://gateway.push.apple.com:2195.
    [2015-12-02 09:56:58][INFO] INFO: Sending messages queue, run #1: 5 message(s) left in queue.
    [2015-12-02 09:56:58][INFO] STATUS: Sending message ID 1 [custom identifier: unset] (1/3): 234 bytes..
    [2015-12-02 09:56:58][INFO] [Push] No errors, cool!
    [2015-12-02 09:56:58][INFO] INFO: Disconnected.

  5. I tested both with the application downloaded from the AppStore and with the Ad-hoc assembly. On different devices.
  6. PHP is running on the server

It is noticed that during generation of .pem file there is no difference between prod.pem and dev.pem. Which is suspicious. Although the files prod.p12 and dev.p12, from which they are obtained, are different.
Maybe I'm generating prod.pem somehow wrong? I will be glad to any thoughts.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Makukha, 2015-12-02
@marsohod

Prod.pem generated differently from this manual
openssl x509 -in aps_production.cer -inform der -out PushChatCert.pem
openssl pkcs12 -nocerts -nodes -clcerts -out PushChatKey.pem -in PushChatKey.p12
cat PushChatCert.pem PushChatKey.pem > production.pem
And voila!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question