Ios – No Identity with Provisioning Profile in XCode

iosiphoneprovisioning-profilexcodexcode4

I'm trying to get my XCode to run apps on my iPhone.

A while ago I tried to do that just from within XCode (knowing nothing), and it complained about how my Apple ID wasn't set up with a developer account. Fair enough.

Now I do have a developer account (I'm a member of an organization). As soon as I got the enrollment email I followed their instructions about setting up the certificates and adding it to my keychain and whatnot.

Then I followed these instructions to try to get XCode set up. When I got to the part about using my device for development, that button wasn't there. But as the instructions say:

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 I clicked "Add to Portal", a provisioning profile appeared in the list, and everything seemed good. I then proceeded to the "Code Sign Your App" section. This is what I see:

enter image description here

I expected there to be a section for iOS Team Provisioning Profile: * or something. And, of course, this means that when I try to run my app it fails with a code signing error.

I've poked around with deleting and re-adding stuff, but this is where I always get stuck. I can provide more information, I just…don't know what you want. How do I proceed?

Thanks.

Best Solution

You can try CMD Shift 2, going to the Devices tab, and refresh the provisioning profiles and/or the team. It should ask you to log in - and hopefully will update your profile for you.

If it doesn't, it's the same every time. Your device needs to be added to the devices on the portal by a team admin. You said you have a certificate. If not using the team provisioning profile, you have to add your certificate to the profile you are using. Then make sure to quit xcode and reopen it after the changes.