I’m mentioning it here in case anyone else would like to reference/jump on this particular bandwagon. rdar://problem/5788673:
Please enable some mechanism for 3rd party applications to receive events or run in the background to poll for events from remote sources.
In the initial release of the SDK, there does not appear to be a mechanism for an SDK application to get activated and receive events in the background (or remotely). For some application scenarios (reminders, instant messaging, alternate reality gaming, etc) it would be nice to enable an interrupt if the user choose to accept them – either in the style of an SMS message highlight on the screen, or the activation of an application as in the case with an incoming call to an iPhone.
These are enabled for Apple applications (mail, SMS, and incoming phone calls being examples). I would like the capability to receive an event through some channel, or to be able to poll for events in the background and activate my application.
The Android SDK reportedly enables a similar SDK functionality using the XMPP protocol (albeit requiring login to Google’s XMPP service – http://code.google.com/android/reference/com/google/android/gtalkservice/package-summary.html). Enabling some mechanism to post and forward events to iPhones, potentially with URL’s to activate local applications, would be very beneficial.
I added the following detail to the bug report – since folks outside Apple can’t see it, I wanted to share it:
I’m specifically looking for a way to get events from external to the iPhone and it’s environment to my custom application. Either via pushing into some queue like mechanism that perhaps apple runs or enabling the application to periodically request data from a remote TCP/IP interface. I’d be using a web application to send the data – likely with a REST interface and the data represented in a JSON of XML format.
My specific desire if for the iPhone to receive events from outside the iPhone and it’s environment (i.e. on the internet) and activate my application if there is anything in the queue for it. In my case, I’d like to be able to get alerts from a monitoring application very much akin to SMS, except have my application intercept that data and provide a more appropriate/informational interface to the message coming in. I can currently receive SMS messages or emails with some amount of data, but an immediate visual representation of the system outage and related metrics would be a far superior user experience.
I thought this might be accomplished by supporting a generic internet event passing mechanism like what is supported with XMPP (small messages basically “stored and forwarded when requested”). To send an event/message to my application, I’d simply submit it to a central XMPP server with a designated address. The iPhone would be the recipient of the address, and assuming that a pub/sub mechanism was working efficiently, it would get the message with little significant delay.
Another option, not as desirable, that came to mind is to poll a remote URL periodically to determine if any data is available. I don’t know what pub/sub options are available, but I’m hoping that something is possible with Apple and ATT’s infrastructure. The alternative of polling seems like it would have potentially significant power draining consequences.
I wondered if the SMS mechanism could be used, the same mechanism to determine that voicemails exist, or perhaps a different mechanism altogether.
If a polling solution (like the original email functionality – poll every 5 minutes sort of thing) is available, then i a central combined queue of events would make sense – as that could be shared across any number of applications. That way the potential for 5 different applications, all polling different URLs or sockets wouldn’t present such an enormous drain the battery.