69
votes

I'm trying to submit my app to TestFlight, but I keep getting this error.

enter image description here

and this is what I have in my info.plist

enter image description here

How do I fix this?

3
have you checked background mode in target capabilities?Yoel Jimenez del valle
Are you using background processing? If not then remove the Capability. If you are then you need to add the identifier your are using when you create your background processing task as per the answerPaulw11
@Paulw11 thank you so much. I had the background processing checked without noticing. I turned it off and it worked. Thank youMustafa Aljaburi

3 Answers

95
votes

Add this in your info.plist and then resubmit your app

<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
    <string>com.yourCompanyName.appName</string>
</array>
30
votes

Or Even Better:

<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>

Best

19
votes

As it says you need to add "BGTaskSchedulerPermittedIdentifiers" to your info.plist. You have turned on background task capabilities for your app but did not add corresponding identifiers.

  1. Goto your Info.plist file. Hover over any item + button will be highlighted. Click on it to add a new item.
  2. Copy and paste "BGTaskSchedulerPermittedIdentifiers" under the Information Property List column. This will create an array in the Type column.
  3. Click the add button on the item you just created to add background task identifiers for the array.
  4. Note that it is recommended by apple to mention task background task identifier in reverse domain notation(com.something.name).

In the end, it will look like this,

info plist image

For more info, you can refer to this Apple doc.