开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜