The Sample App

The sample app for this chapter is called BackgroundTasks. This app demonstrates the two backgrounding approaches: completing a long-running task while the app is in the background, and playing audio continuously while the app is in the background. The user interface is very simple—it presents a button to start and stop background music, and a button to start the background task (see Figure 16.1).

Image

Figure 16.1 BackgroundTasks sample app.

Get iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.