Join Bill Weinman for an in-depth discussion in this video Course overview, part of iOS SDK and SQLite: Building Data-Driven Apps (2013).
- View Offline
iOS is capable of supporting many kinds of applications, games, utilities, social networking, entertainment, news, business, education. What do all of these applications have in common? They all use data. The intent of this course is to show you how to build a data-driven application that uses an external source of data. In order to best demonstrate the techniques you'll need to accomplish this, I have built a simple data-driven application in the form of an RSS news reader.
Many applications drive their content or even their navigation on external data, these are called data-driven applications. The application presented here is a simple example of a data-driven application. The techniques you learn here will apply to many applications in many different categories. Data sources today are commonly in an XML format and iOS provides native support for XML. In this application we'll be reading RSS feeds as RSS feeds are typical of many other types of XML data feeds. The XML portion techniques covered here will apply to many different XML data sources.
After receiving and parsing an XML feed, you will often want to store that data on the device. The native format for data storage in iOS is provided by the SQLite database engine. SQLite is a powerful database that is small, fast, and uses a single file for storage. SQLite is also supported on many other mobile platforms, including Android, Symbian, WebOS, and others. It has even been ported to Windows Mobile. The techniques you learn here for supporting SQLite should be usable from many of your mobile projects.
Once you have your data, you'll want to display that data on the screen. iOS provides a native table view display model, which is commonly used to display data from a database. Table View is very powerful and flexible, and you will likely use Table View a lot for you data-driven applications. Often, external data sources provide links to web pages or other dynamic data. iOS provides a native web view for displaying web pages with all the power of the internal Safari browser. RSS feeds typically link to a web page for their associated content.
These days iOS is more than just the iPhone. So you'll want to learn how to make a universal application that supports iPhone, iPad, and Retina Displays, leveraging your code to take advantage of these platforms while using a single code base. I will also show you how to use the iPad's split view controller providing side by side a Table View for selecting from the database on the left and a web view for displaying content on the right. This is all designed to give you the tools you need to use data in your applications, reading data from an external data source, storing data in a local database on the device, and using data to provide the necessary user experience for your audience.
- Prototyping the app
- Coding and working with a testbed
- Creating an Objective-C interface for SQLite
- Designing a database schema
- Creating the view controllers
- Reading and writing to the database
- Parsing the RSS feed with NSXMLParser
- Updating the item view with feed items
- Implementing the pull to refresh gesture for iOS 6
- Creating a universal application with multiple views