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

UNDERSTANDING BACKGROUND EXECUTION ON THE IOS

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

  • In order to support background code execution, all applications must be compiled against the latest iOS SDK. In other words, if you have downloaded an application from the App Store that is compiled using an older SDK (prior to 4.0), the application will still terminate when you press the Home button on your iOS 5 device.
  • Background code execution is limited to three specific types of applications:
    • Audio — Playing music in the background
    • Location — Getting location data in the background
    • Voice Over IP (VOIP) — Making phone calls through an Internet connection
  • If an application does not meet any of the preceding three criteria, it will be suspended when the Home button is pressed.
  • When an application switches to the background (regardless of whether it is allowed to execute in the background or not), you should always disconnect all network connections (with the exception of VOIP applications). Applications that have active network connections are automatically terminated by the OS when they enter background mode. For example, if your location-based application is transmitting location data to a remote server, you should disable the transmission when the application is switched to the background. While you can continue receiving location data, transmitting it over a network is prohibited when the application is in ...
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