Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Setup:</strong> </p> <p>Mac OS X 10.8 + Xcode 4.4</p> <p><strong>My Simple Solution:</strong></p> <ol> <li>Reissue your ad hoc provisioning profile after you have setup push notifications for your app ID and import them to Xcode.</li> <li>Take a look into your .xcodeproj folder (right click -> Show Package Contents) and delete the <code>xcuserdata</code> folder.</li> <li>That's it ;)</li> </ol> <p><strong>Some hints on that issue:</strong></p> <p>After activating Push Notifications for my app I suddenly couldn't create ad hoc files anymore. I ran across errors in my Console log on my iPhone while trying to install my app such as those:</p> <pre><code>Apr 1 20:56:10 unknown installd[384] &lt;Error&gt;: entitlement 'keychain-access-groups' has value not permitted by a provisioning profile Apr 1 20:56:10 unknown installd[384] &lt;Error&gt;: entitlement 'get-task-allow' has value not permitted by a provisioning profile Apr 1 20:56:10 unknown installd[384] &lt;Error&gt;: entitlement 'application-identifier' has value not permitted by a provisioning profile Apr 1 20:56:10 unknown installd[384] &lt;Error&gt;: 2ff66000 verify_signer_identity: Could not copy validate signature: -402620394 Apr 1 20:56:11 unknown installd[384] &lt;Error&gt;: 2ff66000 preflight_application_install: Could not verify executable at /var/tmp/install_staging.44jV0O/foo_extracted/Payload/PersonalTrainer-Tester-iPhone.app Apr 1 20:56:11 unknown com.apple.itunesstored[392] &lt;Notice&gt;: MobileInstallationInstall: failed with -1 Apr 1 20:56:11 unknown installd[384] &lt;Error&gt;: 2ff66000 install_application: Could not preflight application install Apr 1 20:56:11 unknown installd[384] &lt;Error&gt;: 2ff66000 handle_install: API failed Apr 1 20:56:11 unknown installd[384] &lt;Error&gt;: 2ff66000 send_message: failed to send mach message of 71 bytes: 10000003 Apr 1 20:56:11 unknown installd[384] &lt;Error&gt;: 2ff66000 send_error: Could not send error response to client </code></pre> <p>There is some <a href="https://developer.apple.com/library/ios/#technotes/tn2265/_index.html">technical note</a> which recommends using <code>codesign -d --entitlements - &lt;YourAppName&gt;.app</code> to check if your app is signed properly for Apple Push Notifications. In case the output of the codesign command does not have an aps-environment set to production or development there is something fishy!</p> <p>As far as I knew so far, my apps signed with an adhoc provisioning profile always have an <code>embedded.mobileprovision</code> inside the <code>&lt;YourAppName&gt;.app</code> folder with a specific part in them such as:</p> <pre><code>&lt;key&gt;Entitlements&lt;/key&gt; &lt;dict&gt; &lt;key&gt;application-identifier&lt;/key&gt; &lt;string&gt;ABCDEFGH.com.myappname.tester&lt;/string&gt; &lt;key&gt;aps-environment&lt;/key&gt; &lt;string&gt;production&lt;/string&gt; &lt;key&gt;get-task-allow&lt;/key&gt; &lt;false/&gt; &lt;key&gt;keychain-access-groups&lt;/key&gt; &lt;array&gt; &lt;string&gt;ABCDEFGH.*&lt;/string&gt; &lt;/array&gt; &lt;/dict&gt; </code></pre> <p>After using codesign I realized that the actual binary in <code>&lt;YourAppName&gt;.app</code> had some XML included as well, which said something very different than my <code>embedded.mobileprovision</code> file:</p> <pre><code>&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt; &lt;plist version="1.0"&gt; &lt;dict&gt; &lt;key&gt;application-identifier&lt;/key&gt; &lt;string&gt;ABCDEFGH.com.myappname.tester&lt;/string&gt; &lt;key&gt;get-task-allow&lt;/key&gt; &lt;true/&gt; &lt;key&gt;keychain-access-groups&lt;/key&gt; &lt;array&gt; &lt;string&gt;ABCDEFGH.com.myappname.tester&lt;/string&gt; &lt;/array&gt; &lt;/dict&gt; &lt;/plist&gt; </code></pre> <p>I assume this is the cause for the error message we are all experiencing. (although this error can have some different roots as well as other posts on stackoverflow suggest)</p> <pre><code>The executable was signed with invalid entitlements. The entitlements specified in your application's Code Signing Entitlements file do not match those specified in your provisioning profile. (0xE8008016). </code></pre> <p>My guess is that there is some bug in Xcode which keeps the settings in your plist from being updated in you schemes which then causes your app to be signed with the wrong provisioning profile in the end. So by deleting the xcuserdata folder you delete all schemes. Therefore Xcode will recreate them next time with the proper settings and you are happy again.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload