Chapter 14. The web: web views and internet protocols

 

This chapter covers

  • Using web views
  • Parsing XML
  • Accessing other protocols

Internet connectivity is an essential feature of modern life, and the iPhone and iPad are so useful because iOS allows for easy internet access. In this chapter, we’ll cover the major ways to access the internet from the SDK. You can use a variety of approaches, and we’ll outline their hierarchy in the first section. Later in the chapter, we’ll look at low-level networking, working with URLs, using the UIWebView, parsing XML, using POST, and accessing the social web using various protocols.

14.1. The hierarchy of the internet

Internet programming involves a hierarchy of protocols. At the lowest level are the sockets you use to connect one computer to another. Above them are a variety of more sophisticated technologies, such as FTP, Bonjour, and HTTP. HTTP is a critical protocol, represented on the iPhone and iPad by both low-level access and the high-level UIWebView. Recently, an increasing number of protocols have been built on top of HTTP, forming what we call the social web.

This hierarchy of internet protocols is shown in figure 14.1, along with iOS classes of note.

Figure 14.1. Internet protocols are arranged in a hierarchy.

14.2. Low-level networking

14.3. Working with URLs

14.4. Using UIWebView

14.5. Parsing XML

14.6. POSTing to the web

14.7. Accessing the social web

14.8. Summary

sitemap