Chapter 7. CoreData, iPod access, and playing music—PlayMyLists

 

This chapter covers

  • The CoreData framework
  • Accessing databases
  • Creating and working with music playlists

The iPhone, iPod, and iPad are great music playing devices and allow you to create playlists. You may want to write an app that includes the ability to create a playlist used within the app. With access to the music in the iPod on a device and a database for the app, apps can allow the user to select tracks and create their own play-lists within an app.

Creating playlists is useful, but being able to play them is what’s important. Using the iPod access to select tracks, CoreData to store the selections, and the music player to play the music makes for a usable app.

You’ll build this app as a learning exercise, so it’s not a replacement for the iPod app. But with the techniques you learn in this chapter, you can make a functional app and have the ability to create more complex apps in the future.

As with many data-driven apps, you need a way to store data, and CoreData is a great tool for that. You’ll design a database within Xcode and have the related code generated for you. You’ll use CoreData to store and retrieve the data related to your playlists. Because this is the basis of your app, and because you’ve covered UI-based topics in previous chapters, we’ll now focus attention on CoreData concepts.

7.1. Creating a table view project

7.2. Displaying CoreData for data-driven apps

7.3. Accessing iPod music

7.4. Playing music with iOS

7.5. Summary

sitemap