2014年7月22日 星期二

iOS App background process


To run background service, need to declared in info.plist file.

Add UIBackgroundModes key and set its value to array containing one or more of the following:
  • audio—The app plays audible content to the user while in the background. (This content includes streaming audio or video content using AirPlay.)
  • location—The app keeps users informed of their location, even while it is running in the background.
  • voip—The app provides the ability for the user to make phone calls using an Internet connection.
  • newsstand-content—The app is a Newsstand app that downloads and processes magazine or newspaper content in the background.
  • external-accessory—The app works with a hardware accessory that needs to deliver updates on a regular schedule through the External Accessory framework. bluetooth-central—The app works with a Bluetooth accessory that needs to deliver updates on a regular schedule through the CoreBluetooth framework.

Point to note:
https://developer.apple.com/library/ios/DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html


沒有留言:

張貼留言