title: Yet another ERROR ITMS-90161: "Invalid Provisioning Profile"
body: <p>Over the past couple of days I've worked my way through all the prior posts on here that I could find that seemed to be related (many of them appear to be horrifically out of date and less than useful now), as well as the Apple Troubleshooting and Maintaining Your Signing Identities and Certificate guides (not to mention the usual Internet searches).</p>
  
  <p>The app in question was deploying fine until the latest XCode update, but now fails to upload (build is successful obviously, and there have been code changes as well):</p>
  
  <pre><code>ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning profile included in the bundle *content removed* is invalid. [Missing code-signing certificate]. A Distribution Provisioning profile should be used when submitting apps to the App Store. For more information, visit the iOS Developer Portal."
  </code></pre>
  
  <p>It's not the first time I've mysteriously had a failure like this, but in prior cases simply revoking the certs, removing the profile, then rebuilding would take care of it.  Not so in this case.</p>
  
  <p>The provisioning profile is confirmed to be the correct type, and the code signing certificate sure looks like it's in there...  Certificate gets a nice green checkmark too.  Any new suggestions not covered in the usual places?</p>