| Tutorial: Networking and Bonjour on iPhone |
| Wed, 20 May 2009 06:18 PM |
|
A few weeks ago I was invited to give a talk about using networking in iPhone applications to a group of NYU students as part of their iPhone Programming course. Since a good example was needed to demonstrate the core concepts, we decided to create a simple chat app that uses sockets, streams and Bonjour to allow users to host and join chat rooms and talk to each other over the network. The lecture didn't go as smoothly as I have hoped. Despite my best efforts to keep it brief, there was a lot of code to cover and I simply ran out of time. Lesson learned: Stick to talking about concepts ("what you need to do" and "why you do it this way") and let the source code speak for itself ("how to do it") - especially if it has plenty of comments, which it did. The contents of that lecture (after being reworked into something a bit smoother than the original) have now been released as a tutorial and published on the excellent iPhone development blog MobileOrchard in hopes that it will reach it's intended audience - those that want to learn how to create networked iPhone applications or are looking for code examples to take apart and reuse. Here is the link to the article. Enjoy! P.S. Thanks to Dan Grigsby from MobileOrchard for publishing the tutorial. -- Peter Bakhyryev |