| Main |

iPhone background communication

Craig Hockenberry (via DF) makes a good point about allowing arbitrary background apps to use the iPhone’s radios.

It seems likely that he’s right about the future direction Apple will take with this. My own preference would be for a generalised events framework, maybe based on the existing notification support. If it supported launch-on-notification, there wouldn't really be a need for background apps at all, it seems to me. Doing things this way would mean that it was possible to co-ordinate use of the device's radios in a sensible way, and it would also allow applications to ask to have code run e.g. at a certain time in the future, without having to leave any of their own code running in the background.

Trackbacks

TrackBack URL for this entry:
http://alastairs-place.net/movabletype/mt-tb.cgi/216.

Comments

You mean, like launchd? That's basically what it was invented for (e.g. auto-launch an app when someone starts talking to a particular port), and I guess if Apple added a few more triggers, it could be used for this pretty easily.

Yes, exactly. launchd would be a good place for this kind of thing, though it would need to grow some extra APIs and/or support for looking inside application bundles for things to run. But it certainly fits with the existing run-when-this-port-is-touched feature, so you’re right, it seems a logical place to put it.

I suppose there’s still room for concern about the activities that processes started this way might get up to, though a lot of that could be alleviated using the new sandboxing feature and perhaps also with the older UNIX resource limits (ala setrlimit(2)).

Post a comment

If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thank-you for your patience.

(Your e-mail address will not be displayed or included in any pages served on this site; nor will you get any spam as a result.)

A live preview of your comment will be displayed below. It should refresh automatically when you stop typing, but if not then the “Preview” button above will update it.

Live Comment Preview