Open adrianmalik opened 9 years ago
+1 I'm facing the same issue, could you please remove that badge parameter by default and send only when is set by the user.
You can see only if badge is other than 0 it is set in \ZendService\Apple\Apns\Message
. The same is true for sound
, content-available
and category
but in this cases the comparison is with null
My PR sets the default badge to be null.
@alalonde , do you mean this PR #89? I don't see here changes connected with the badge, only with sound field.
So, the issue is still present?
Hmm, it's been awhile since I created that, but I might have reverted that part of the PR, so as not to fix multiple things at once.
Please allow developers to remove badge field. For example class ZendService\Apple\Apns\Message accepts badge to be null (then badge is not sent) but you force badge field to be an integer.
Class: Sly\NotificationPusher\Adapter\Apns Lines: 163- 166 Content of that lines: $badge = ($message->hasOption('badge')) ? (int) ($message->getOption('badge') + $device->getParameter('badge', 0)) : 0 ;
Sample solution: