-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Triggering APN on New Message #46
Comments
I'm going to guess that you're talking about using this with a webapp (probably Rails). Queuing a background job with https://github.com/mperham/sidekiq or http://github.com/defunkt/resque to send the notification would probably be the best idea. Grocer, doesn't have any specific Railsyness that plugs right in, but it should be pretty easy to just queue up the notification job in some kind of It would probably be cool if we had a blog post about Grocer + Rails to like to. Did that answer your question? |
Yeah @vanstee that helps, I'll take a look at the two things you sent me. I'm surprised I haven't seen a more concise Grocer + Rails blog post like you've suggested. Feel like it could be very valuable for those trying to implement this sort of functionality. Thanks for the help! |
@michaelperalta One side note. If you go the background job route, you'll probably want to make sure you open the connection in the parent process/thread. Apple specifically mentions not to open and close connections for each message. They identify it as a denial of service I think. |
@vanstee I'm using Grocer on a Rails application with Sidekiq. Would you mind write a Wiki/Blog about the correct way to integrate Grocer with Sidekiq? Thanks. 😺 |
@linjunpop Totally. I'll try to find some time over the next few weeks. |
Sounds great, definitely looking to implement this in my app soon so it would be very helpful. I appreciate it. |
@vanstee Do you wanna have a look at this? https://gist.github.com/linjunpop/5202365, Thanks 😺 |
I'm curious, and I just may not be seeing it in the explanation, of where I would put the trigger to send the APN when a new Message is received. Just as a brief explanation, I want to send a push notification to a user when he receives a new message. Can anyone provide me with some assistance on how to make this work?
The text was updated successfully, but these errors were encountered: