Reputation: 1775
I'm trying to submit my app to TestFlight, but I keep getting this error.
and this is what I have in my info.plist
How do I fix this?
Upvotes: 152
Views: 85174
Reputation: 1099
Actually I had to do both of these:
<dict>
tag.<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
Info
tabPermitted Background Task Scheduler Identifier
Array type. if you cannot find it, add it using +
on a unexpanded menu on the list.+
on the Permitted Background Task Scheduler Identifier
. Make sure its mark is expanded (down chevron). And it will add an item with String Type, and add your bundle ID there... or add $(PRODUCT_BUNDLE_IDENTIFIER)
so it will take the bundle identifier automatically.make sure to use proper bundle identifier convention as mentioned in other answers well.
Thanks for all who have response to this question before, I found them very helpful.
Upvotes: 14
Reputation: 141
Add "BGTaskSchedulerPermittedIdentifiers" to "info.plist" by paying attention to a few points.
Add "Permitted background task scheduler identifiers"
Upvotes: 8
Reputation: 4524
Add this in your info.plist and then resubmit your app
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
or if you use more than one BGTask then use this code
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>com.yourCompanyName.appName1</string>
<string>com.yourCompanyName.appName2</string>
</array>
Upvotes: 226
Reputation: 8533
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
Best
Upvotes: 97
Reputation: 3167
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.
In the end, it will look like this,
For more info, you can refer to this Apple doc.
Upvotes: 42