title: Failed to verify code signature of MYAPP.app
body: <p>I am trying to sign my iOS distribution package with <strong>distribution provisioning profile and certificate</strong>. The bundle can be created and signed with no error, however, when I try to install the package through command line I get the following error.</p>
  
  <blockquote>
    <p>ERROR: Install failed. Got error "ApplicationVerificationFailed" with
    code 0xe8008015: Failed to verify code signature of
    /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.FVZk62/extracted/Payload/MYAPP.app
    : 0xe8008015 (A valid provisioning profile for this executable was not
    found.)</p>
  </blockquote>
  
  <p>I can push the application to TestFlight and the app can be installed successfully, but it crashes immediately on Splash Screen with the same error message in the device log.</p>
  
  <p>I have cross checked application's entitlements and entitlements in ItunesConnect and they completely match. Furthermore, I have validated the signature of my package based on <a href="https://developer.apple.com/library/content/technotes/tn2318/_index.html#//apple_ref/doc/uid/DTS40013777-CH1-TNTAG0" rel="nofollow noreferrer">this guide</a> and looks fine.</p>
  
  <p>I ran the following command and everything looks healthy.</p>
  
  <pre><code>codesign --verify -vvvv -R='anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.1] exists and (certificate leaf[field.1.2.840.113635.100.6.1.2] exists or certificate leaf[field.1.2.840.113635.100.6.1.4] exists)' Payload/MYAPP.app 
  </code></pre>
  
  <p>The output:</p>
  
  <blockquote>
    <p>Payload/MYAPP.app: valid on disk.<br>
    Payload/MYAPP.app: satisfies its Designated Requirement.<br>
    Payload/MYAPP.app: explicit requirement satisfied.   </p>
  </blockquote>
  
  <p>Has anyone faced a similar problem or know what can be the possible root cause?</p>