title: Provisioning New Device for Development Xcode
body: <p>I am a new iOS developer, and although I have been successful in provisioning a device for development in Xcode in the past, I just obtained a new device and am having an awful time getting Xcode to provision it and allow me to test applications on it.</p>
  
  <p>When I connect the new device to Xcode, Xcode does recognize and identify the device correctly, however when I run the application I get the following error message: "A valid provisioning profile for this executable was not found."</p>
  
  <p>According to the Apple documentation, I am supposed to first request a development certificate in Xcode using the following steps: </p>
  
  <ol>
  <li>Choose Window > Organizer > Devices</li>
  <li>Select Provisioning Profiles.</li>
  <li>Click the Refresh button at the bottom of the window.</li>
  <li>Enter your user name and password and click Log in.</li>
  <li>After you sign in to your account, a prompt appears, asking whether Xcode should request your development certificate.</li>
  </ol>
  
  <p><strong>I have followed steps 1 - 4 repeatedly and each and every time Xcode crashes before I can get to step 5.</strong> I have tried completely closing xcode, detaching device, cleaning project, restarting computer, etc. Is there another way to request a development certificate outside of Xcode?</p>
  
  <p>Ok so then the docs say I should provision the device (granted I assume this step is contingent upon the success of the previous step which I cannot achieve, but I tried it anyway) using the following steps:</p>
  
  <ol>
  <li>Connect your device to your Mac.</li>
  <li>Open the Devices organizer </li>
  <li>select your iOS device.</li>
  <li>Click the “Use for Development” button.  The first time you add a device ID to your account, Xcode creates the iOS Team Provisioning Profile using the iOS Wildcard App ID, your development certificate, and the device ID. The iOS Team Provisioning Profile is also installed on your iOS device.  If the device was used for development in the past, the “Use for Development” button may not appear. If this happens, click “Add to Portal” at the bottom of the screen instead.</li>
  </ol>
  
  <p><strong>So the "use for development" button does not appear (it appeared the first time I attempted this and hasn't since), so I clicked the "add to portal button". Every single time I do this, Xcode crashes.</strong> </p>
  
  <p>I currently have the code signing identity set to iPhone Developer (my name). I have also tried setting it just to iPhone Developer and even Do Not Code Sign. I also went to the iOS dev center and added the device there (not sure if I needed to do that or not). </p>
  
  <p>In any case, can anyone suggest anything I might be missing or any other approach?</p>