Update core.rb
Isn't this loop redundant and make the bulk of notifications to be sent more than once?!
We just experienced some serious multi-notification spam via the new library, so I think it may well be...
Originally from the @toto checkin I think.
@wlipa indeed, that is a bug I introduced when updating the lib. Will have a look why the tests did not catch this, they should have.
I verified that this is indeed the cause of the multi-notification problem. @theosp can you please bump the bundle version as well (https://github.com/toto/APNS/commit/f134e9057765716a42dc6bfb086e96e1daa1a249), so @jpoz can quickly merge this in.
Building a regression test for this needs a bit more time, but it should be fixed ASAP.
The library is very dangerous to use as is. 1.1 should be pulled unless a fix is forthcoming.
True, unfortunately only @jpoz can do that. As he does not seem to notice this thread, I will try him via mail.
@toto , @wlipa , @toto In my opinion 1.0 should be set as the production version of the gem for at least a couple of weeks. 1.1 needs more testing even with this fix.
I wonder if we can get the gem pulled some other way if @jpoz is out of action. It really shouldn't be distributed in the current state as it very easily leads to an absolute nightmare of multiple alerts and very annoyed users.
bad time for me to take a vacation i guess. I'll get this merged in. This maybe a a good time to have a collaborator on this gem. Any takers? @toto @theosp
yanked 1.1.0
Thanks for merging. would be glad to help.
I will make sure to build a regression test for this problem. Currently only the single notification is tested, not what get's written to the socket in the end. That is how this slipped through.
Can this be pushed out, or is there still work to do?
I have cleaned up a few things and added patches. Take a look at https://github.com/toto/APNS. I will do a new PR, so @jpoz can take a look. I bumped the version to 1.1.1 though, to ensure that everything get's updated correctly after the 1.1.0 debacle.
Also I should note that I use my 1.1.1 code in production sending out push to >100k devices - including content_availiblepushes. So the format implementation is robust.