34

I'm new to iPhone development.I have already gone through some of the exploring pages to create UIBackgroundModes key in Info.plist for iOS4 .But it is little bit difficult to understand . Kindly provide some step by step procedure with screenshot example for easy understanding...also specify what the requirements which are needed ie iPhone, OS version 4.0...

mfaani
  • 33,269
  • 19
  • 164
  • 293
Mano
  • 389
  • 1
  • 4
  • 8
  • See [this answer](http://stackoverflow.com/a/42302369/5175709) for more clarification on how to use Xcode capabilities or plist – mfaani Feb 21 '17 at 18:27

3 Answers3

90

The UIBackgroundModes key identifies which background tasks your application supports. Its value is an array that contains one or more strings with the following values:

  • audio – The application plays audible content to the user while in the background.
  • location – The application keeps users informed of their location, even while running in the background.
  • voip – The application provides the ability for the user to make phone calls using an Internet connection.

You can edit the Info.plist file on Xcode. To add a new key, click on the + sign and write:

iOS 4

"UIBackgroundModes" as the key, make sure the type is set to string and then in value write audio, location or voip depending on your needs: Info.plist

iOS 6

"Required background modes" as the key and then set the type in drop down menu.

enter image description here

Michal
  • 15,429
  • 10
  • 73
  • 104
Iñigo Beitia
  • 6,303
  • 4
  • 40
  • 46
4

In IOS 13. It would be like the list given below.

enter image description here

Talha Rasool
  • 1,126
  • 14
  • 12
4

Here's the link to the documentation:

https://developer.apple.com/documentation/bundleresources/information_property_list/uibackgroundmodes

Name: "Required background modes" Type: Array of strings

Valid values:

  • audio
  • location
  • voip
  • external-accessory
  • bluetooth-central
  • bluetooth-peripheral
  • fetch
  • remote-notification
  • processing
Jessica
  • 9,379
  • 14
  • 65
  • 136