Skip to Main Content
Beginning iOS 4 Application Development
book

Beginning iOS 4 Application Development

by Wei-Meng Lee
October 2010
Beginner content levelBeginner
655 pages
14h 9m
English
Wrox
Content preview from Beginning iOS 4 Application Development

Chapter 21. Background Applications

WHAT YOU WILL LEARN IN THIS CHAPTER

  • How background code execution works in your iPhone applications

  • Monitoring application states

  • How to detect and opt out of background execution

  • How to track location information in the background

  • Creating local notifications

One of the main features of iOS 4 is its support for background applications. Unlike the previous versions of the iPhone OS, iOS 4 does not automatically terminate your application when you press the Home button on your device. Instead, your application is put into a suspended state and all processing is paused. When you tap on the application icon again, the application resumes from its suspended state and continues execution. If your application should continue executing in the background, you need to modify it to inform the OS.

In this chapter, you will examine how background execution works and some of the limitations placed on your applications. In particular, you will learn how to modify the location application covered in Chapter 20 so that it will continue working even after the user has switched it to the background. Last but not least, you will learn about the local notification feature that is new in iOS 4.

Understanding Background Execution on the iPhone

While iOS 4 supports background code execution, there are several things that you need to understand before you write your application:

  • In order to support background code execution, all applications must be compiled against the iPhone ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning iOS 5 Application Development

Beginning iOS 5 Application Development

Wei-Meng Lee

Publisher Resources

ISBN: 9780470918029Purchase book