title: Cannot add distribution provisioning profile to Xcode 5
body: <p>I'm trying to distribute my Phonegap app on the iTunes. I have done this before successfully before but I have since changed to a new Mac. I'm using Xcode 5.0.2.</p>
  
  <p>I have created development and distribution certificates. I then created an App ID, entering the Bundle ID under "Explicit App ID". </p>
  
  <p>I then created a development provisioning profile for the app, choosing the correct App I.D., the iOS Development certificate, my device, giving the profile a name and clicking "generate".  I download it and double click to add to xcode. The xcode organiser opens and I see it added under my device provisioning profiles. I can then successfully run the app on my physical device. </p>
  
  <p>Now I want to distribute it. I created a new provisioning profle, selecting "App Store" under Distribution, selecting the correct App I.D., the iOS Distribution certificate, and clicking "generate". When I double click the downloaded file, the organiser in xcode opens, but the distribution provisioning profile doesn't under the device provisioning profiles. When I click the + button to add the profile, I cannot select the Distribution provisioning profile, but I can select the Development provisioning profile: 
  <img src="https://i.stack.imgur.com/VhjJW.png" alt="enter image description here"></p>
  
  <p>I have no idea why this is. I tried closing down and opening xcode, to no avail. I tried waiting a few hours. Again, it didnt work. </p>
  
  <p>I then try to distribute my app by creating an archive. First I go to build settings > code signing and choose iPhone Distribution:</p>
  
  <p><img src="https://i.stack.imgur.com/r5xTc.png" alt="enter image description here"></p>
  
  <p>I then select my physical device and choose Product > Archive. I get the error:</p>
  
  <pre><code>No matching provisioning profiles found
  None of the valid provisioning profiles include the device Belgian Iphone  (identifier: xxxxxxxxxxxxxxxxxxxxxxx).  
  Xcode can resolve this issue by downloading a new provisioning profile from the Member Center.
  </code></pre>
  
  <p>I click "Fix Issue" and end up with the error:</p>
  
  <pre><code>There was an error generating the team provisioning profile for AppID 'FT49U8Q9JE'.
  </code></pre>
  
  <p>The AppID given here is different to the prefix in App ID's in the developer portal. I don't know if it should be the same. Any suggestion? I have spent 3 days on this problem and as stated above, I had no issues on my previous mac (which I no longer have)!</p>