Keep getting Invalid entitlements when defining custom ones

I am trying to add the Universal Links and Fonts entitlement to my project so I created a Entitlements file like below after updating the identifier for the app. Next, I regenerated my certificates and provision profiles. If I now check the provision file for iOS Development in Quickview the entitlements are listed.

I saved the files in Resources/[BinaryName].entitlements and it’s marked as a AppResource.

<?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>application-identifier</key>
    <string>2943B48G98.uk.xxx.apps.BinaryName</string>
    
    <key>com.apple.developer.associated-domains</key>
    <array>
        <string>applinks:pay.tapico.cloud</string>
        <string>webcredentials:example.com</string>
    </array>
    
    <key>com.apple.developer.team-identifier</key>
    <string>2943B48G98</string>
    <key>com.apple.developer.user-fonts</key>
    <array>
        <string>app-usage</string>
        <string>system-installation</string>
    </array>
    <key>get-task-allow</key>
    <true/>
    
    <key>keychain-access-groups</key>
    <array>
        <string>2943B48G98.*</string>
        <string>com.apple.token</string>
    </array>
</dict>
</plist>

Only when I try to run the application on the phone it’s failing when it tries to deploy it to the iPhone with the error:

2021-04-28 17:47:47.167 ios-deploy[25641:333342] [ !! ] Error 0xe8008016: The executable was signed with invalid entitlements. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)

Now I made a new identifier and provision profile using the same certificate and new app and now I am getting that same error I had earlier.

not sure I can be of much help here — we just pass those thru as they are. Ive had issues with that in the past to, but you;ll have to dick that out Wirth thats configured in the profile on Apple’s site and what you have in the .entitlements :(. sorry.

But the entitlements config in Project Settings were you can select the Entitlements file from in your project that gets directly passed to the underlying tooling or are things added? I am wondering if I need to add those keys com.apple.developer.team-identifier, application-identifier and keychain-access-groups to my Entitlements file.

I also have a feeling that the it might be using the wrong certificate to sign the app but need to find out how I can confirm that. I wish I could fidn out with which certificate uuid Xcode signed the application.

I believe it gets merged with the entitlements already in the profile.

Check if the profile contains them.

The build log should show you exactly what cert is being used. (same in Xcode, so you can compare)

Cool, I will try it out and report back

1 Like

After trying this again with a different certificate, provisioning profile and bundle identifier it seems to work. I was able to use custom fonts in a new app which raised some other problems which I reported earlier today :slight_smile:

Now trying if Universal Links / Custom Domains entitlement works too and I am good.

1 Like