Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Provisioning New Device for Development Xcode

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.

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."

According to the Apple documentation, I am supposed to first request a development certificate in Xcode using the following steps:

  1. Choose Window > Organizer > Devices
  2. Select Provisioning Profiles.
  3. Click the Refresh button at the bottom of the window.
  4. Enter your user name and password and click Log in.
  5. After you sign in to your account, a prompt appears, asking whether Xcode should request your development certificate.

I have followed steps 1 - 4 repeatedly and each and every time Xcode crashes before I can get to step 5. 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?

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:

  1. Connect your device to your Mac.
  2. Open the Devices organizer
  3. select your iOS device.
  4. 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.

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.

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).

In any case, can anyone suggest anything I might be missing or any other approach?

like image 356
jac300 Avatar asked Apr 08 '13 16:04

jac300


2 Answers

While I was sleeping, Apple completely abolished the Portal and created a new and apparently largely broken interface. It's like a kind of evil April Fools joke. Anyway, if you go to https://developer.apple.com/account/ios/device/deviceList.action there's a great big sign telling you that you must "reset your device list before adding any new devices". That sounds like it covers exactly your case. Good luck.

enter image description here

like image 90
matt Avatar answered Sep 23 '22 10:09

matt


I also went to the iOS dev center and added the device there (not sure if I needed to do that or not).

You need to add the device there.

Steps You need to follow after adding device:

  1. Next re-download the mobile provisioning profile again.

  2. Go to organizer and delete the old mobile provisioning profile you had.

  3. Double click the new mobile provisioning profile you just downloaded and see that it appears on the organizer.

  4. Connect your device and you should see your device's name instead of iOS device.

hope this helps.

like image 22
lakshmen Avatar answered Sep 22 '22 10:09

lakshmen