title: can not install ad-hoc ipa MISValidateSignatureAndCopyInfo failed
body: <p>I using a CI system to build ipa automatically. </p>
  
  <p>Basically I called this command line in build script:</p>
  
  <p><code>xcrun -sdk iphoneos PackageApplication -v $APP -o $Output --sign "$Company_name" --embed "$Provision_path"</code></p>
  
  <p>It works well before till after I update xcode to 4.5.1 and change the $Provision_path to a new path. </p>
  
  <p>The ipa can not installed after that, the error look like: </p>
  
  <pre><code>&lt;Error&gt;: 0x1c1000 handle_install: Install of "$apppath.ipa" requested by itunesstored
  &lt;Error&gt;: 0x1c1000 MobileInstallationInstall_Server: Installing $appID
  &lt;Error&gt;: Nov 16 10:08:31  SecTrustEvaluate  [leaf AnchorSHA1 IssuerCommonName]
  &lt;Error&gt;: Nov 16 10:08:33  SecTrustEvaluate  [leaf AnchorTrusted]
  &lt;Error&gt;: developer cert trust result = 5
  &lt;Error&gt;: 0x1c1000 verify_signer_identity: MISValidateSignatureAndCopyInfo failed for /var/tmp/install_staging.EuYJEL/foo_extracted/Payload/name.app/name: 0xe8008018
  &lt;Error&gt;: 0x1c1000 do_preflight_verification: Could not verify executable at /var/tmp/install_staging.EuYJEL/foo_extracted/Payload/name.app
  &lt;Error&gt;: 0x2ff9a000 MobileInstallationInstall: failed with -1
  &lt;Error&gt;: 0x1c1000 install_application: Could not preflight application install
  &lt;Error&gt;: 0x1c1000 handle_install: API failed
  </code></pre>
  
  <p>I check the build log, the difference between this time as last time is the $SignName</p>
  
  <pre><code>/usr/bin/codesign --force --sign "$SignName" --resource-rules=*** --entitlements *** 
  </code></pre>
  
  <p>I believe the <code>$SignName</code> is exactly the same with the same as <code>$Company_name</code> in the command line.</p>
  
  <p>But currently, the <code>$SignName</code> is something like <code>e38e96a4asfsdd779db94ceasdfg24d9assdf898</code>.
  Do anyone have a clue what is the possible problem? </p>