Groups
Sign in
Groups
apns-php
Conversations
About
Send feedback
Help
"$message->setBadge(0);" doesn't work since iOS5
297 views
Skip to first unread message
Daniel Gura
unread,
Oct 28, 2011, 12:11:38 PM
10/28/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to apns-php
Hello everbody,
the statement "$message->setBadge(0);" in the following source code
doesn't work since iOS5:
try
{
// Instantiate a new Message with a single recipient
$message = new ApnsPHP_Message($row['iPhoneDeviceToken']);
// Set badge icon to "x"
$message->setBadge(0);
// Set the expiry value to x seconds
$message->setExpiry(5*60);
// Add the message to the message queue
$push->add($message);
$i++;
}
catch (Exception $e) { /* nothing to do... */ }
Does someone has experience with this and can help me?
thanks in advance,
Daniel
prim...@gmail.com
unread,
May 29, 2012, 6:30:08 PM
5/29/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to apns...@googlegroups.com
I couldn't get it to remove the badge number when sending a zero either, but I was able to get it working by editing the Message.php file like so:
Replace:
if (isset($this->_nBadge) && $this->_nBadge > 0) {
With:
if (isset($this->_nBadge) /*&& $this->_nBadge > 0*/) {
sharmila kishan
unread,
Aug 10, 2014, 9:42:07 AM
8/10/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to apns...@googlegroups.com, prim...@gmail.com
Thanks I got solve my problem
Reply all
Reply to author
Forward
0 new messages