title: "Entitlement has value not permitted by a provisioning profile", but it does not
body: <p>I am trying to install an AdHoc build through TestFlight, but I am having some strange difficulties. Below is the console log that iOS outputs after downloading the binary and beginning installation. The key issue is that iOS says that entitlements does not match mobileprocision data but when I compared them, they match.</p>
  
  <p>I have double checked all values in mobileprovision, entitlemtnts.plist and even in the resulting IPA (unzipped and looked into compiled binary) and it all looks fine and matching.
  The <code>embeded.mobileprovision</code> has values matching entitlements values in application binary (when IPA is unpacked and binary opened as text).
  Every value mentioned in error is present in profile and entitlements and the values are matching.</p>
  
  <p>I also tried cleaning project, deleting all profiles from device, deleting app from device, restarting device, deleting profiles in Dev Portal and creating new one, and also all of the similar questions asked on Stackoverflow. Nothing helps for now.</p>
  
  <p>So my, question is: How iOS knows that these values are mismatched? Because values in compiled binary are matching values in embedded profile.</p>
  
  <p>I mentioned that I am using Testflight for distributing AdHoc builds because Testflight is automatically verifying app binary (entitlements and profile), and when I uploaded binary with mismatched values it showed errors as described in their FAQ section <a href="http://help.testflightapp.com/customer/portal/articles/402843-mismatched-keychain-access-groups" rel="noreferrer">here</a> and <a href="http://help.testflightapp.com/customer/portal/articles/402872-mismatched-ubiquity-kvstore-identifier-value" rel="noreferrer">here</a></p>
  
  <p>The other strange thing is that the same errors are appearing more times in a row (5 times now, but I have seen up to 7 times repeating).</p>
  
  <p>Has anyone ever experienced similar issue?</p>
  
  <p>Thanks in advance, and here is the mentioned console log:</p>
  
  <pre><code>Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'keychain-access-groups' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'com.apple.developer.ubiquity-container-identifiers' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'com.apple.developer.ubiquity-kvstore-identifier' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'application-identifier' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'keychain-access-groups' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'com.apple.developer.ubiquity-container-identifiers' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'com.apple.developer.ubiquity-kvstore-identifier' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'application-identifier' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'keychain-access-groups' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'com.apple.developer.ubiquity-container-identifiers' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'com.apple.developer.ubiquity-kvstore-identifier' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'application-identifier' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'keychain-access-groups' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'com.apple.developer.ubiquity-container-identifiers' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'com.apple.developer.ubiquity-kvstore-identifier' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'application-identifier' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'keychain-access-groups' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'com.apple.developer.ubiquity-container-identifiers' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'com.apple.developer.ubiquity-kvstore-identifier' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: entitlement 'application-identifier' has value not permitted by a provisioning profile
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: 00403000 verify_signer_identity: Could not copy validate signature: -402620394
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: 00403000 preflight_application_install: Could not verify executable at /var/tmp/install_staging.bsgxAn/foo_extracted/Payload/myapp.app
  Mar 27 17:58:21 unknown com.apple.itunesstored[144] &lt;Notice&gt;: MobileInstallationInstall: failed with -1
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: 00403000 install_application: Could not preflight application install
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: 00403000 handle_install: API failed
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: 00403000 send_message: failed to send mach message of 71 bytes: 10000003
  Mar 27 17:58:21 unknown installd[138] &lt;Error&gt;: 00403000 send_error: Could not send error response to client
  </code></pre>