Determining Whether Multitasking Is Available

Determining Whether Multitasking Is Available

  Apps must be prepared to handle situations where multitasking (and therefore background execution) is not available. Even if the device is running iOS 4 or later, the device may not support multitasking. 

  Apps必须处理无法后台运行的情况。即使设备在运行iOS4或以上版本,这台设备也可能不支持多任务 。

  And multitasking is never available on devices running iOS 3 and earlier. If your app is capable of running on these earlier versions of iOS, it must be prepared to run without multitasking.

  App后台运行无法跑在iOS3和早期版本里。如果你的app想要跑在低版本iOS上,必须处理好无法后台运行的情况。

  If the presence or absence of multitasking changes the way your app behaves, check the multitaskingSupported property of the UIDevice class to determine whether multitasking is available before performing the relevant task.

  在执行后台任务前,通过UIDevice的multitaskingSupported属性来判断是否支持多任务。

  To do this, you must build your app against iOS SDK 4 or later and check to see if the property is available before accessing it, as shown in Listing 3-2. Checking the property allows your app to continue running on earlier versions of iOS that do not support multitasking.

  

原文地址:https://www.cnblogs.com/tekkaman/p/3741362.html