title: Xcode provisioning profile issues when trying to run applications on a iOS device
body: <p>I'm following the excellent Stanford CS193P course (Fall 2011) on iTunes U:<br>
  <a href="http://www.stanford.edu/class/cs193p/cgi-bin/drupal/downloads-2011-fall" rel="nofollow">http://www.stanford.edu/class/cs193p/cgi-bin/drupal/downloads-2011-fall</a></p>
  
  <p>I'm trying to run my application (Calculator) from Xcode 4.2 with iOS 5 on my iPhone 3GS with iOS 4.3.3 </p>
  
  <p>I followed those instructions:<br>
  <a href="http://www.stanford.edu/class/cs193p/cgi-bin/drupal/system/files/lectures/Developing%20on%20Devices.pdf" rel="nofollow">http://www.stanford.edu/class/cs193p/cgi-bin/drupal/system/files/lectures/Developing%20on%20Devices.pdf</a></p>
  
  <p>I was able to obtain my developer certificate with no problem.</p>
  
  <p>I went to the iOS Dev Center and created a provisioning profile. I entered this in the form fields:</p>
  
  <ul>
  <li>Profile Name: I entered "Calculator" (does it matter?)</li>
  <li>Certificates: I selected my name (only option since I created only one developer certificate)</li>
  <li>App ID: I selected "Calculator" (only option since I created only one App Id)</li>
  <li>Devices: I selected my device (only option since I created only one device)</li>
  </ul>
  
  <p>I'm pretty sure I did the right thing for my certificate and for my device.</p>
  
  <p>For the App Id, I was a bit confused.</p>
  
  <ul>
  <li>Description: I entered "Calculator" (again, does it matter?)</li>
  <li>Bundle Seed Id (App ID Prefix): It was displayed "Your Team Id xxxxxxx will be used as you App Id Prefix" (and I couldn't change it)</li>
  <li>Bundle Identifier (App ID Suffix): I entered "com.myname.calculator"</li>
  </ul>
  
  <p>Should a provisioning profile be made for one app (create a new one for each app I make) or for one developer (create only one for all the apps I make)?</p>
  
  <p>When I finally completed my provisioning profile, I imported it in Organizer (in Xcode) and plugged in my iPhone and clicked on "Use for Development".  I thought I was all done!</p>
  
  <p>However, when I try to run my application in Xcode using my connected device, I get the following error message:</p>
  
  <blockquote>
    <p>No provisioned iOS devices are available with a compatible iOS
    version. Connect an iOS device with a recent enough version of iOS to
    run your application or choose an iOS simulator as the destination.</p>
  </blockquote>
  
  <p>Is it because I did something wrong with my provisioning profile?
  I searched around and my settings in Code Signing Identity and .plist seems to be OK.</p>
  
  <p>Or is it because my iPhone has iOS 4.3.3 and I'm trying to develop using iOS 5.0?
  That was the first thing I thought could be the problem, so I said, let's upgrade to 5.0.  However, it seems like I can only upgrade my iPhone to iOS 6.01, which I don't want to cause that iTunes U course is targeting iOS 5.0 and I know for sure some stuff won't work.  Is there a way to upgrade my iPhone to iOS 5.0 only? </p>
  
  <p>Right now I'm trying to figure out where the problem actually is... my provisioning profile or my iPhone device?</p>
  
  <h1>EDIT #1:</h1>
  
  <p>I started from scratch using a brand new application (I created a single-view application with a label "Hello World!" added to the view... nothing more).  I then created another provisioning profile from scratch by following this:<br>
  <a href="http://mobile.tutsplus.com/tutorials/iphone/iphone-sdk-install-apps-on-iphone-devices-for-development/" rel="nofollow">http://mobile.tutsplus.com/tutorials/iphone/iphone-sdk-install-apps-on-iphone-devices-for-development/</a></p>
  
  <p>I still had the same error message.</p>
  
  <p>I then went to the Build Settings of my new project and changed the iOS Deployment Target from iOS 5.0 to iOS 4.3... and then my application launched on my device!  However, the application didn't display my "Hello World!" label.</p>
  
  <p>So it looks like I'm doing the right thing... but my device iOS is too old.  I would like to upgrade it to iOS 5.0 but not iOS 6.01... is it possible?</p>
  
  <h1>EDIT #2:</h1>
  
  <p>I upgraded my iPhone 3GS to iOS 6.01 and when I clicked on the "Use for Development" button in Organizer, I got this error message:</p>
  
  <blockquote>
    <p>The version of iOS on “My iPhone” does not match any of
    the versions of iOS supported for development with this installation
    of the iOS SDK. Please restore the device to a version of the OS
    listed below, or update to the latest version of the iOS SDK; which is
    available here.</p>
    
    <p>OS Installed on Gaston Vachon’s iPhone<br>
    6.0.1 (10A523)</p>
    
    <p>Xcode Supported iOS Versions Latest<br>
    5.0 (9A334)<br>
    4.3<br>
    4.2 (8C134)<br>
    4.2  </p>
  </blockquote>
  
  <p>Now I would have to upgrade my Xcode to the latest version (4.5.2) but I can't since I'm using Snow Leopard.  So I would have to upgrade my Mac OS to either Lion or Mountain Lion then upgrade Xcode to 4.5.2 (iOS 6.01) and then It would probably work.  However, since I'm following that iTunes U course done with Xcode 4.2 and iOS 5.0, I would rather wait to do those upgrades until I have completed this course.</p>
  
  <p>I guess I can't win!</p>