Profile doesn't match the entitlements file's value for the com.apple.application-identifier entitlement

1.1k views Asked by At

I know there are already a lot of posts about this error, but I could'nt figure out a way to fix my specific situation.

I have trouble validating/distributing a macOS application from the Xcode Organizer. When Xcode asks me to choose provisioning profiles it shows me this error:

Profile doesn't match the entitlements file's value for the com.apple.application-identifier entitlement.

enter image description here

StockMonitor.app has a "Copy files" build phase to move Launcher.app bundle to a subfolder.

enter image description here

In Xcode the provisioning profiles looks correct

enter image description here

When I check the entitlements from the command line after archiving I can see that for whatever reason the Launcher.app got the identifier from StockMonitor.app.

❯ codesign -d --entitlements - Launcher.app/
Executable=/Users/lukas/Library/Developer/Xcode/Archives/2022-05-23/StockMonitor 23.05.22, 14.55.xcarchive/Products/Applications/StockMonitor.app/Contents/Library/LoginItems/Launcher.app/Contents/MacOS/Launcher
[Dict]
    [Key] com.apple.application-identifier
    [Value]
        [String] UE4U5XA7R9.de.lukaswuerzburger.stock-monitor
    [Key] com.apple.developer.team-identifier
    [Value]
        [String] UE4U5XA7R9
    [Key] com.apple.security.app-sandbox
    [Value]
        [Bool] true
    [Key] com.apple.security.application-groups
    [Value]
        [Array]
            [String] group.UE4U5XA7R9.de.lukaswuerzburger.stock-monitor.settings
    [Key] com.apple.security.cs.disable-library-validation
    [Value]
        [Bool] true
    [Key] com.apple.security.files.user-selected.read-only
    [Value]
        [Bool] true
    [Key] com.apple.security.network.client
    [Value]
        [Bool] true

The entitlement file is here:

enter image description here

The build settings are like this:

enter image description here

It looks like Xcode takes the entitlements from StockMonitor.app and overrides the entitlements of Launcher.app. The question is how to prevent that.

0

There are 0 answers