Join Bill Weinman for an in-depth discussion in this video Exercise files, part of iOS App Development: Building Data-Driven Apps with SQLite.
- The exercise files for this course are included with your basic lynda.com membership. If you are a lynda.com member you have access to the exercise files used throughout this title. Copy the exercise files to a location where you can find them on your system. I've copied the exercise files to the desktop on this system, you may put them wherever you will find them. The exercise files are laid out in chapters. You see each of these chapters has the files that are related to that chapter in the course.
There's also a folder for the completed BWRSS application. There's a folder for the icons that are used in the application. And, each of these folders includes the Photoshop file and in some cases the Adobe Illustrator file that is used for these icons, and then the resulting png files that are actually used in the application. There's also a folder for the BWDB library, this is the source code for the library that's used in the application.
And, there's a folder called SQL that includes the SQL source code for the database that's used in the application. Most of the exercise files are in the form of an Xcode project. In order to use one of these projects I recommend that you make a working copy and I do this by holding down the option key and just dragging the folder a little bit and this will make a copy of the folder. And then, I rename the folder with "-working", among other things this removes the space from the folder name.
And then, you open the project by double-clicking on the .xcode project file. And, this launches Xcode and opens the project. You can then build and run the project with command R on your mac keyboard. And, this'll run the project in the IOS simulator. When you're done with the simulator you can switch back to Xcode by pressing command tab, and command period will finish running the application on the simulator.
Now while Xcode is certainly a great development tool it's actually not perfect. Sometimes it can lose it's place or just start acting badly. There's a few things you can do when this happens. You can Clean your project, and under Product you'll see a menu item for Clean. I usually just press shift command K like this, sometimes that may not solve a problem in which case you can do a deeper clean. If you'll notice this menu item changes when I press the option key. Option shift command K will do a Clean Build Folder, have to confirm it here.
What this does is this removes all of the object files so that everything has to be complied fresh in order to build the project, and oftentimes that'll solve a problem. Also, the simulator may carry along with it even if you delete the application off the simulator, it may hold onto some of the data files. You can solve this by re-setting the simulator in the simulator menu, Reset Content and Settings, again you must confirm. And, this resets the simulator just like it would refresh a phone to its original distribution state.
So, you'll see that there's no longer any applications stored on this, nor is there any data. This is like having a fresh phone. When all of this fails sometimes just exiting Xcode and restarting it will solve a problem. I know it shouldn't be like this, but it is and it always has been. Xcode is a large and complex system and while today's version is better than it's ever been it's still just not perfect. When you're finished working with a project, I'm just gonna close both of these, the simulator and Xcode with command Q. When you're finished working with a project you may delete it, your working copy.
And, you still have the original because you're working with a copy. Or, you may save it for future experimentation. I'm just gonna delete this one for now, pressing command and the delete key which actually just moves it to the trash can, so it can be recovered if necessary. The exercise files are here to make your learning experience easier and more powerful. Be sure to take the time to read the code and experiment with it. Make changes, make mistakes, there's a lot of code here take the time to learn with it. Now, let's get started with IOS, SDK, and SQLite building data driven applications.
- Building a testbed
- Creating an Objective-C interface for SQLite
- Creating a CRUD interface
- Designing the database schema
- Creating the main table view
- Creating the items table view
- Adding new feeds
- Parsing feeds with NSXML Parser
- Viewing webpages
- Preparing icons and toolbar images
- Adding a preferences pane
- Including pull-to-refresh and other features