Howdy,
My macOS application uses app groups, using an entitlement file similar to the one below.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>$(TeamIdentifierPrefix)com.example.test</string>
</array>
</dict>
</plist>
This all works when using my local Xcode. However, when I push the job to our CI/CD server I get an error.
error: Provisioning profile doesn't include the com.apple.security.application-groups entitlement. Profile qualification is using entitlement definitions that may be out of date. Connect to network to update.
Searching around, namely macOS Unsatisfied entitlements com.apple.security.application-groups and System Extension app-group entitlement issue tells me that I do not need to have the app group contained within my provisioning profile, due to how macOS handles App Groups differently to iOS.
Is there a way to tell xcodebuild
on my CI box to ignore this and continue building?
The exact problem rookuuu has happens when I attempt to build in my CI pipeline with the exact same provisioning profile and key. Specifically GitHub Actions + GitHub-Hosted Runners using GitHub instructions for installing profiles.
Sounds like we're in the same boat. However, I think I've found the solution.
When you run xcodebuild
, if it picks up a provisioning profile with the extension ".mobileprovision", even though the target is macOS it runs the provisioning profile validation steps as if it was iOS. Raising the iOS specific errors about App Groups.
I followed the same document which similarly mislead me into changing the file extension away from ".provisionprofile", simply renaming them back in the example workflow did the trick for me. Hopefully it does for you also.
I've had the GitHub docs updated to include a note that reflects this, but this is probably also an Xcode bug that it's trusting the extension of the profile over the build target?