You'll find chapter-wise code bundle in the ZIP file. The book is so organized that it guides you to develop a data-drive application step-by-step. That is, by the end of the book, you'll be having a complete data-driven running application with you. In case, you want to run the end product directly, follow the below given steps:
1. Unzip the source bundle of the last chapter, Chapter 11, Displaying the Products for Sale and Updating the Stock on your local Mac.
2. Open Xcode, go to File | Open from the menu, and browse to the unzipped bundle of Chapter 11, Displaying the Products for Sale and Updating the Stock. In the
probfolder, select the
prob.xcodeprojfile followed by clicking on the Open button.
3. Select the Build and Run icon from the Xcode project window to run the application. You'll get the main view of the application as shown in the following image. But the application is not yet ready to run until we define the photos of the master products (products that we are going to sell through application).
4. To define photos of the master products in iPhone Simulator, go to Home and then click on the Photos icon (refer to the given image (a)).
5. We get the Albums page as shown in image (b). Because we have not created any photo album yet, the figure displays the message, No Photos.
6. Drag the first image,
IMG_0000.JPGprovided in the code bundle of Chapter 11, Displaying the Products for Sale and Updating the Stock onto the simulator screen. Tap on the image and hold down the mouse on the image until the popover comes up, as shown in image (c). Click on the Save Image button to save the image.
7. Repeat the procedure for the other three images (IMG_0001.JPG, IMG_0002.JPG, IMG_0003.JPG). After saving the four images, the simulator will display the images as shown in image (a).
8. On clicking back to Photos, we find that an album Saved Photos appears with one of the images considered as the icon of the photo album (image (b)). The number (4) in parenthesis represents that there are four images in this photo album.
9. Now, our application is completely ready for execution. For any guidance regarding operating the application, refer to the An application output sample section in Chapter 2, Understanding Core Data.