开发者

Is it possible to develop a background application (other than audio, location and voip) on iOS 4.0 and later?

开发者 https://www.devze.com 2023-03-14 03:43 出处:网络
I know that from iOS 4.0 onwards we can execute our code in background. But this support is only limited to following types of application:

I know that from iOS 4.0 onwards we can execute our code in background. But this support is only limited to following types of application:

  1. audio
  2. location
  3. voip

To let iOS runtime know about the background tasks we have to declare UIBackgroundModes key in Info.plist. UIBackgroundModes key could be chosen from the above mentioned list.

My question is can we create an application on iOS 4.0 later that can execute its code in background for unlimited time? My application type does not belong to audio, location or voip.

Reference from iOS Application Programming Guide --> Executing Code in the Background

Can we create a background application other than category aud开发者_开发百科io, location or voip?


You can start code that can run for a period after the app goes to the background by calling -[UIApplication beginBackgroundTaskWithExpirationHandler:], but - besides for the three types of services you mention - not for an unlimited time.

0

精彩评论

暂无评论...
验证码 换一张
取 消