How should I send push notifications only to active devices?
===

I have an iOS app with a Rails backend (and frontend).  I am using Parse for push notifications.

I am trying to figure out the best way to only send push notifications that will be received; that is, I want to avoid sending them to:

 - Users who only use the web app and don't have the iOS app
 - Users who had the iOS app but then uninstalled it

The way that the Parse Push API works is that I can broadcast a notification on a certain channel, and any device that is listening to that channel will receive the notifications.  Therefore, I am planning to make separate channels for each user.

Obviously, I am going to need to store some sort of information on the server side about who is running the iOS app.  I'm curious as to whether anyone out there has experience solving a problem like this and can offer any wisdom.  Thanks!

