11.0. Introduction
iOS apps, when connected to the Internet, become more lively. For example, imagine an app that brings high-quality wallpapers to its users. The user can pick from a big list of wallpapers and assign any of those images as his iOS background. Now consider an app that does the same thing but adds to its list of wallpapers every day, week, or month. The user comes back to the app, and voilà! Tons of new wallpapers are dynamically added to the app. That is the magic of web services and the Internet. This can easily be achieved with basic knowledge of networking, XML, JSON, and sharing options, along with some creativity on the app developer’s part.
The iOS SDK allows us to connect to the Internet and retrieve and
send data using the NSURLConnection
class. JSON serialization and deserialization will all be done using the
NSJSONSerialization class. XML parsing
will be done using NSXMLParser, and the
Twitter connectivity will be done using the Twitter framework.
The iOS 7 SDK brings along new classes that we can take advantage of
in this chapter. One of these classes is the NSURLSession, which manages the connectivity to
web services in a more thorough way than the NSURLConnection class does, as we shall see
later in this chapter.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access