1

I have an app that I want to profile it using Instruments. I can use the Instrument with the App in the simulator but I can't do it with my device, although the device is registered for Ad-Hoc and development in the provisional profile and I can install the app using Hockey-App so I am sure there is no problem with the device and the code signing part. However I can profile it when the build configuration is Debug, only Release doesn't work.

I get the following error.

The executable was signed with invalid entitlements.

The entitlements specified in your application’s Code Signing Entitlements file are invalid, not permitted, or do not match those specified in your provisioning profile. 

none of the following links could help me:

Entitlements file do not match those specified in your provisioning profile.(0xE8008016)

Entitlements don't match Provisioning Profile (0xE8008016)

the result of codesign -d --entitlements - release-app-path

<!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>TEAM_ID.BUNDLE_IDENTIFIER</string>
        <key>aps-environment</key>
        <string>production</string>
        <key>beta-reports-active</key>
        <true/>
        <key>com.apple.developer.associated-domains</key>
        <array>
            <string>applinks:SOME_URL</string>
        </array>
        <key>com.apple.developer.team-identifier</key>
        <string>TEAM_ID</string>
        <key>get-task-allow</key>
        <false/>
    </dict>
</plist>
  • Did you follow a tutorial? Example: https://dzone.com/articles/ios-code-signing-part-4-provisioning-profiles – Gillsoft AB Oct 02 '18 at 18:13
  • @Alan Update your question with a list of the Stack Overflow answers you tried that didn't work so people don't suggest things you already tried. – Swift Dev Journal Oct 02 '18 at 18:31
  • @GillsoftAB no I did it my self. The beta testing is working flawlessly. I just can't profile in release mode. –  Oct 02 '18 at 19:40
  • @MarkSzymczyk Question updated. tnx –  Oct 02 '18 at 19:40
  • Does it help if you go YourAppName > Edit Schemes > Profile and change the build configuration to Release? – Rhythmic Fistman Oct 02 '18 at 20:14
  • @RhythmicFistman if I do that and put it on Release I get this error, if I put it on debug it works. –  Oct 03 '18 at 09:23
  • So is that a solution? – Rhythmic Fistman Oct 03 '18 at 09:28
  • @RhythmicFistman No I want it to profile it in release configuration. –  Oct 03 '18 at 09:29
  • What does `codesign -d --entitlements - release-app-path` say? – Rhythmic Fistman Oct 03 '18 at 09:35
  • @RhythmicFistman I updated the question with the result of the command. –  Oct 05 '18 at 07:09
  • Are you sure your distribution provisioning profiles / certificates have the current device set in their accepted device list? – Gil Sand Oct 05 '18 at 11:44
  • 1
    @GilSand 100%, even when I choose the device from top left drop down menu and click on info button next to the provisional profile Xcode says includes "XXX iPhone" –  Oct 05 '18 at 11:58
  • Well, you're in a pickle. – Gil Sand Oct 05 '18 at 12:00
  • Have you tried working backwards from a working solution? Aka a brand new projects, then test, then add instruments, then test, then go in release, then test. etc. See if you can make it work with a hello world project and then compare with your entitlements/info plist/developer settings, see if you can spot the difference from that? My point is, removing complexity for the sake of clarity – Gil Sand Oct 05 '18 at 12:02
  • @GilSand I really am in a pickle. I try it, maybe it helps. tnx anyway –  Oct 05 '18 at 14:48
  • @Alan did you ever resolve this? Just encountered this myself. – Phil Aug 07 '19 at 19:23
  • 1
    @Philzay nope, still no progress. If you could solve, please share it here. –  Aug 11 '19 at 08:45

0 Answers0