Skip to Content
Beginning iOS 5 Application Development
book

Beginning iOS 5 Application Development

by Wei-Meng Lee
January 2012
Beginner content levelBeginner
655 pages
16h 35m
English
Wrox
Content preview from Beginning iOS 5 Application Development

21

Programming 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 beginning with version 4 is its support for background applications. Unlike previous versions of the iPhone OS, iOS 4 (and later) 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, which was introduced with iOS 4.

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

Mastering iOS 12 Programming - Third Edition

Mastering iOS 12 Programming - Third Edition

Donny Wals
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 9781118144251Purchase book