Giter Club home page Giter Club logo

Comments (13)

stevenharman avatar stevenharman commented on May 26, 2024

How are you sending the notifications? If you're sending them back to back, over the same connection I suspect you're falling victim to Issue #14 - Apple is closing the socket after the first bad notification and dropping the rest. Can you try sending them over different connections, or will a few seconds wait between them and then see what you get?

from grocer.

judgetr avatar judgetr commented on May 26, 2024

hey @stevenharman , thanks for the quick response. I read that issue and thats why i tried to send the push notification to the only single deleted device token, so there is only push for one connection. I tried with another device iphone 4s 7.1.1 and it gives me failed attempt as it was suppose to do, but still no feedback on iphone 5 one.

for information this is how i test

pusher=Grocer.pusher(opt)
feedback=Grocer.feedback(opt)
notification=Grocer::Notification.new( device_token: token , badge: 2, alert: 'hello')
pusher.push(notification)

after that i iterate feedback and it returns nil.

from grocer.

stevenharman avatar stevenharman commented on May 26, 2024

Well, darn. I wonder if you're also being bitten by #80 - the #each doesn't do what you'd expect it to do. Perhaps I should re-open that one and move forward with removing Enumerable support and instead adding our own API for iterating through feedback.

Could you try #to_a on the feedback to force it to all be read?

from grocer.

judgetr avatar judgetr commented on May 26, 2024

@stevenharman , i looked over that issue aswell and i tried to see the count all i needed to see was '1' instead of 0 :) so i dont think thats it aswell, and after i tried to check it with to_a i get empty array anyway.

from grocer.

stevenharman avatar stevenharman commented on May 26, 2024

To clarify, after installing and enabling push notifications on three different phones, and then uninstalling the app on each, you're seeing the following results:

  1. iPhone 6, iOS 8.1.1 - Feedback received
  2. iPhone 5, iOS 7.1.1 - Feedback not received
  3. iPhone 4S, iOS 7.1.1 - Feedback received

It sounds like perhaps that device 2 (iPhone 5) isn't properly being unregistered with APNS and so they're not reporting it via Feedback.

What happens if you open multiple push connections, push each notification, and then open a Feedback connection and read? We'd expect to get 3 Feedback notifications, but you're getting... how many?

from grocer.

judgetr avatar judgetr commented on May 26, 2024

Yes exactly, for the first problem yes when i try to send in each loop it only gives one single feedback but when i send seperatly i only get 2 feedback.device_token where i should have get 3.

from grocer.

stevenharman avatar stevenharman commented on May 26, 2024

Hmmm... I have another idea. Perhaps the notification for the iPhone 5 isn't actually being accepted by APNS. That is, it could be "bad". In such a case, APNS will write an error message on the push notification connection before closing the socket. (See the docs around Figure 5-2 on how APNS handles bad notifications.) Because the notification was "bad" and never accepted by APNS, there won't be any Feedback for it.

from grocer.

stevenharman avatar stevenharman commented on May 26, 2024

@judgetr Any luck? I'm wondering if there's something I can to help, or if this issue can be closed out. Please let me know. Thanks!

from grocer.

judgetr avatar judgetr commented on May 26, 2024

@stevenharman i'v been struggling with other issues i couldnt give this topich the right amount of attention nor time, but i'll be investigate a bit more within this week, thank you for your concern.I think this issue should be stay open so we can communicate better.
Have a nice one

from grocer.

pkuruppu avatar pkuruppu commented on May 26, 2024

+1
It looks like I'm having the same issue here. I'm using an iphone 6, and I'm able to successfully receive the notifications using grocer. However when I uninstall my ios application and try sending a notification, I don't see anything returned in my feedback. Feedback returns nil, and when I call .to_a on it before doing an .each, it returns an empty array.

from grocer.

stevenharman avatar stevenharman commented on May 26, 2024

@pkuruppu Do other devices work as expected?

from grocer.

pkuruppu avatar pkuruppu commented on May 26, 2024

Yes - other devices do work as expected

from grocer.

stevenharman avatar stevenharman commented on May 26, 2024

Hello @pkuruppu. I'm going to close this Issue due to inactivity. Please re-open it if you are still experiencing the problem and/or have more information to add.

Thank you!

from grocer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.