Application failed codesign verification (!?!**!)

After rearranging the components of an iOS project around, all of a sudden the archive was giving a warning at the end:

Application failed codesign verification. The signature was invalid, contains disallowed entitlements or it was not signed with an iPhone distribution certificate. (-19011)

The strange thing is that if I went to the Verification button in the Organizer, everything was happy and the app passed initial validation.

But I figured I had best clear the warning anyway. As a result, my moving items around caused a path to become too long. The way that I fixed it was to go into the Behaviors in Xcode, Locations tab, and set the Derived Data path to a custom path that was much shorter than the normal library path that shows up there. Doing this and rebuilding caused the archive to go through normally.

The key to this was looking at this Apple web page and noticing that I was getting the “Failed to load provisioning profile from” message in my build output:

Technical Note TN2250

BTW, Happy Birthday to Billy Sheehan, one of the most talented and versatile performers that I have ever seen.

6 Comments

  1. Vineesh says:

    please help me I have the same problem

    vineeshtp88@gmail.com

  2. BP says:

    Sorry, I don’t have any insight into this issue other than what I found in the Apple technical note that I linked to in the article.

  3. Brandon says:

    Thanks this resolved my issue perfectly. 🙂

  4. Mitsumatak says:

    Thanks! This fixed my problem.

  5. Leena says:

    I am not able to make this issue work.

    It give me same error if i change the derived data path too..
    this is error

    Executable=/Users/leenakhera/Library/Developer/Xcode/DerivedData/SnapNStirbjnlrcnvyznbthayfmkrthcesays/Build/Intermediates/ArchiveIntermediates/Snap + Stir/InstallationBuildProductsLocation/Applications/SnapNStir.app/SnapNStircodesign_wrapper-4.1: using Apple CA for profile evaluationAssertMacros: trust_result == kSecTrustResultUnspecified, file: codesign_wrapper.c, line: 593AssertMacros: profile, file: codesign_wrapper.c, line: 918codesign_wrapper-4.1: Failed to load provision profile from: /Users/leenakhera/Library/Developer/Xcode/DerivedData/SnapNStir-bjnlrcnvyznbthayfmkrthcesays/Build/Intermediates/ArchiveIntermediates/Snap + Stir/InstallationBuildProductsLocation/Applications/SnapNStir.app/embedded.mobileprovision – (null

  6. BP says:

    This does not look like the same error described in the post. However, I would still recommend that you try to alleviate the problem by modifying the Derived Data to a short Custom path. For example, create a folder called build on the root of your hard drive and then use /build as the path. From the looks of the error pasted into the comment, the Derived Data path is still set to default in your Xcode preferences.

Leave a Reply