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:
- audio
- location
- 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.
精彩评论