Background modes in Flutter project (Android Studio)

Hello, I'm developing an iOS app in Flutter, but I'm having trouble enabling Background Mode.

I added the following configuration to Info.plist and Runner.entitlements:

<key>UIBackgroundModes</key>
<array>
    <string>processing</string>
    <string>fetch</string>
    <string>location</string>
</array>

However, the Background Mode option doesn't appear in my App ID to be enabled.

And the build fails with the message: Provisioning profile "Ready Response ios_app_store ..." doesn't include the UIBackgroundModes entitlement.

How can I enable this option in my App ID?

Note: I'm using Android Studio and publishing through Codemagic.

Answered by DTS Engineer in 806255022

Hello. Please try cleaning any cached files in your Xcode project (using the Product>Clean Build Folder... command) and trying a new build. It looks like you are trying to add the capabilities yourself through the entitlements file. Please try adding this capability using the "+ Capability" command under Signing & Capabilities in your Xcode project's build settings. This will take care of setting up your .entitlements file.

Accepted Answer

Hello. Please try cleaning any cached files in your Xcode project (using the Product>Clean Build Folder... command) and trying a new build. It looks like you are trying to add the capabilities yourself through the entitlements file. Please try adding this capability using the "+ Capability" command under Signing & Capabilities in your Xcode project's build settings. This will take care of setting up your .entitlements file.

Obrigado pela ajuda, editei o Runner.entitlements manualmente, pois estou utilizando o Android Studio e publicando pelo Codemagic.

É possível hablitar o Background Mode no App ID do portal apenas com o XCode?

When editing my app's App ID, Background Modes doesn't appear

Background modes in Flutter project (Android Studio)
 
 
Q