0

I am using rpush gem to send push message to iphones. One user complain message sometime delivered some times not. I checked the rpush.log. Out of 10 messages, 3 got delivered and received by the phone as shown in rpush.log: [2015-05-25 22:25:45] [xxxx_production] 48121 sent to 083a15xxx [2015-05-25 22:27:57] [xxx_production] 48124 sent to 083a15xxx [2015-05-25 22:29:24] [xxx_production] 48125 sent to 083a15xxx

Other not delivered messages dont show up in rpush.log. But they show in rpush_notifications table as delivered=1 and failed=0. Such as:

| id    | delivered | delivered_at        | failed | failed_at |
| 48122 |         1 | 2015-05-25 22:26:47 |      0 | NULL 

I don't know how to further debug the problem? What may cause rpush not deliver the message but still update the rpush_notifications table as delivered=1?

WayneZhao
  • 1,517
  • 3
  • 13
  • 8

1 Answers1

0

Check retries column in rpush_notifications table. Seems like you see temporary problems in rpush.log (i.e. one from next retries has been successful).

  • All the messages delivered or not delivered has retires column value 0. – WayneZhao May 26 '15 at 18:33
  • I noticed the messages has empty alert column. Sending push with empty alert column may cause the issue? – WayneZhao May 26 '15 at 18:34
  • No, I don't think so. Probably the PN has been delivered then your application will be in foreground? In this case user won't see PN alerts and sound but application can handle incomming PN in code. Details [here](http://stackoverflow.com/questions/14872088/get-push-notification-while-app-in-foreground-ios). – ethyl.bradtke May 26 '15 at 18:47
  • That is possible. So if app is in foreground, rpush.log wont show PN sent to xxxx? – WayneZhao May 26 '15 at 19:50