Compiling an iOS app with UIBackgroundModes entitlement

Hi,

my app has to use background audio and everything works so far.

I created a info.plist File with background audio configured:

<key>UIBackgroundModes</key>
<array>
    <string>audio</string>
</array>

Trying to compile the app Xojo throws this error:

**The operation couldn’t be completed. 2024-12-19 17:05:43.573 xcodebuild[3676:212068] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path "…
error: exportArchive Provisioning profile “…” doesn’t include the UIBackgroundModes entitlement.

I did a bit of research. Background modes are no entitlements that have to be configured in the App-ID on Apples developer portal. Xcode somehow integrates the entitlement into the provisioning profile on the fly when compiling the app.
How could I do this with Xojo?

How did you import this plist into your project?

Scratch that. UIBackgroundModes Is not an entitlement. It’s just meant to be a plist entry.

I suggest that you select the iOS target on the navigator and then click the advanced tab on the inspector. There’s an entry there for background and clicking to edit the options, I’m pretty sure you can select audio in there. That’ll set up the plist the way it needs to be.

Hi Greg,

I already did that. I enabled Audio in the background capability.
The Plist is selected in the Entitlements section.

You should remove the plist. The option you are specifying is not an entitlement

Regarding to Configuring background execution modes | Apple Developer Documentation it is an entitlement and Xcode itself adds this also to the plist