davedelong / StackKit

A CoreData-like approach to a StackOverflow api
Other
147 stars 14 forks source link

Push Notifications #10

Closed davedelong closed 14 years ago

davedelong commented 14 years ago

(from http://stackapps.com/questions/346/stackkit-an-api-framework-for-cocoa/703#703 )

Is it possible to get a push notification when a new answer appeared for a specific question?

davedelong commented 14 years ago

Sure, but not with StackKit. Push notifications have to come from somewhere, and if StackKit is running on your device, why don't you just use it to pop up a UIAlertView, or toss a badgeValue on your app or something?

In general, push notification architecture generally looks something like this:

Server => Apple servers => Device

In other words, a server notices that something has changed. In this case, you've set up to be notified when a favorite changes. That "noticing" has to be done by a server, who then notifies Apple, who then pushes a notification to your device.

So you can use StackKit to "notice" changes, if you write a tool to constantly monitor for changes and that's running on a Mac OS X-based server (like an Xserve). Once you find a change, however, it'd be up to you to push that to a device via Apple's push notification servers.