SUMMARY

In this chapter, you have seen how background execution works and how you can utilize it to make your applications more useful. You have also seen the other types of notifications that you can utilize in your applications — scheduling local notifications though the operating system, and using the NSNotification class for notifying objects within your application.

Combining all the different concepts discussed in this chapter will enable you to write compelling iOS applications.

EXERCISES

  1. Name the three types of applications that are allowed to execute in the background.
  2. Which devices support multitasking?
  3. For the CLLocationManager class, when should you use the startUpdatingLocation and startMonitoringSignificantLocationChanges methods? Why?
  4. What is the difference between Apple Push Notification service and local notifications?

Answers to the exercises can be found in Appendix D.

image WHAT YOU LEARNED IN THIS CHAPTER

TOPIC KEY CONCEPTS
Opting out of background execution Use the UIApplicationExitsOnSuspend key.
Tracking locations in the background Use the UIBackgroundModes key.
Monitoring significant location changes Use the startMonitoringSignificantLocationChanges method.
Creating local notifications Use the UILocalNotification class.
Scheduling a local notification [[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
Presenting ...

Get Beginning iOS 5 Application Development 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.