richsage / RMSPushNotificationsBundle

NOT MAINTAINED! ⛔️ Push notifications/messages for mobile devices. Supports iOS, Android (C2DM, GCM), Blackberry and Windows Mobile (toast only). A Symfony2 bundle.
MIT License
321 stars 152 forks source link

Errors checking - getResponses? #94

Closed mpclarkson closed 9 years ago

mpclarkson commented 9 years ago

Hi there

After sending push messages as follows:

 $message = new iOSMessage();
 $message->setMessage($body);
 $message->setDeviceIdentifier($uuid);
 $this->getContainer()->get('rms_push_notifications')->send($message) 

The message is not received on the test phones although they are registered to receive remote notifications with the following code (in Swift):

let notifications:Bool = UIApplication.sharedApplication().isRegisteredForRemoteNotifications()

When I check if there are any errors in the bundle, as follows:

$this->getContainer()->get('rms_push_notifications')->getResponses("rms_push_notifications.os.ios")

I receive the following response:

Array
(
    [0] => 1
)

Does the 1 indicate boolean true (i.e. success) or something else? I'm not sure I understand how to debug message sending.

Many thanks!

Matt

mpclarkson commented 9 years ago

Well, I have the messages now sending to my device. The issue was that the combined PEM key and PEM cert was not correct. OpenSSL was not throwing any errors but the APN service was not forwarding the message. Still unsure what the 1 means.