Chapter 19. Connecting to the World with Networking
In This Chapter
Learning to use the Objective-C classes NSURLRequest and NSURLConnection |
Sending e-mail from within your app using the MessageUI framework |
Using Core Foundation networking to do low-level networking tasks |
Using Bonjour to discover services on the local network |
One of the incredible things about the iPhone is that underneath it all, it really is running Mac OS X. This means that down deep, underneath everything else, lies the beating heart of UNIX. It's true, if you dig deep enough into the iPhone OS, you eventually find that there is a full UNIX file system and many of the libraries and capabilities that you've come to expect from a UNIX computer.
Normally, even as a developer, you are sufficiently isolated from UNIX that it simply doesn't matter to you that UNIX is underneath the covers. But there's one area where having UNIX available to you becomes a definite asset. That area is in the realm of networking.
UNIX was built with networking from the ground up, and so it's no surprise that its networking stack is one of the best available. As a result, the iPhone, because of its heritage, shares this excellent networking capability. The iPhone not only has built-in BSD sockets, but it also has an excellent set of Cocoa Touch classes that enable you to work with sockets with very little effort. The beauty of this design is that when you need simple things done, you have the higher-level abstractions available to you. Things ...
Get Cocoa Touch™ for iPhone® OS 3 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.