40

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?

jac300
  • 5,182
  • 14
  • 54
  • 89
  • 27
    To be clear, it is **totally safe** to touch the mysteriously-named "Reset your device list before adding any new devices." button. It does NOT ERASE ANYTHING .. on the NEXT SCREEN you get the option to get rid of devices/colleagues/etc you no longer need. It is always safe to touch that button, you won't lose anything! – Fattie Oct 24 '13 at 10:47
  • @JoeBlow Thx for this hint. Everythink looks like the whole list will be deleted. Worked everything fine hitting the button! :) – Alex Cio Jun 03 '15 at 12:08
  • 1
    right! it's a weird button! – Fattie Jun 03 '15 at 12:33

3 Answers3

24

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

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • Hello Matt, What happens if you press "Get started" on this message? Does it already reset the device list, or is that just a kind of reminder and you can just continue to add device to the existing list? I think the latter, but before I press it I'd like to be sure - I'd hate to have to re-enter 40 device ids ... – TheEye Oct 22 '13 at 11:27
  • @TheEye It was so long ago that I can't remember! However, I've been using the new "portal" ever since April and I haven't lost any existing devices. – matt Oct 22 '13 at 15:03
  • Ok thanks, I guess I dare to push the button ... at least it's not red, that has to count for something ;-). – TheEye Oct 22 '13 at 15:07
  • Well, it's not like you've got any choice! :)))) – matt Oct 22 '13 at 19:09
  • 15
    Not really :-). I did it, and this it was happens: You get a new screen, telling you to select the devices you want to carry over to the new developer year - all devices are pre-selected already, so just press OK and that's it. They should tell you that's going to happen when you press the "Get Started" button ... – TheEye Oct 25 '13 at 08:17
  • Yes, now that you remind me, I remember about the "carry over to the new year" part. So when they say "reset" they really mean something like "renew". Actually what they are doing is a _good_ thing: they are giving you a chance to subtract devices that you don't want to count against your 100, something that you can't do at any other time. In fact, I now remember, I took advantage of this moment to do exactly that. – matt Oct 25 '13 at 14:22
  • Of course it's a good thing, just scary when the explanation is a bit vague - and it's a client's account, not your own ... – TheEye Oct 25 '13 at 14:52
  • 1
    @TheEye thanks for commenting what you saw after pressing that button. Apple did threatened me for no reason! :\ – NightFury Dec 31 '13 at 11:26
17

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.

matt
  • 515,959
  • 87
  • 875
  • 1,141
lakshmen
  • 28,346
  • 66
  • 178
  • 276
0

If you are looking to bypass the 'Register a Device' portion of the Provisional Profile registration simply upload the 'sample .txt file' they provide you and upload it. You will then be allowed to click 'Next' to finish the registration so this way you do not have to enter a device UID.

dhahn
  • 729
  • 9
  • 11