XCode 7 : Adding a new device to an XCode-managed provisioning profile

Let me just start this post with a question : why is this still so hard?? Moreover, WHY does it only keep getting harder???

I don’t know what the XCode team are thinking, but the whole point of having your provisioning profiles managed by XCode is that it should make things simple and automagic. Well, not so.

Previous versions of XCode all had their quirks, but at least there was a refresh button that you could press that would reload and regenerate any provisioning profile if you, for instance, added a new device on the member center. Yes, a refresh button. easy right? Well, maybe they thought that was too easy so they decided to remove it.

As of XCode 7, supposedly, all profiles update automatically. Or do they?

I just added a new device to my member center, but it didn’t get added to my XCode-managed profiles. I restarted XCode and nothing. Then I stumbled upon a tip to actually delete the provisioning profiles then wait for XCode to regenerate them again and hit Dowload All. So I went to try to delete them, and guess what, as of the latest update XCode 7.0.1 (7A1001) the option to delete them is gone now. So you can try to right-click on them to your heart’s content and nothing will happen. sigh….I would scream if only it wasn’t so late at night already.

There is a solution, though I don’t consider it a solution at all, more like a brute force workaround:

Deploy a test app from XCode to your new device!

This will trigger XCode to then prompt you about the fact that there is no provisioning profile for that device installed and give you the “Fix Issue” button.

Click on “Fix Issue” and wait till the test app is deployed. I impatiently shortcut it right after clicking it and it still didn’t work, so all good things come to those who wait.

I can’t wait for XCode 8 now to see what is the next dumb thing the XCode team is going to do about this.

Sort it out already, Apple!

 

Xamarin build error : No valid iPhone code signing keys found in keychain

if getting the error “No valid iPhone code signing keys found in keychain” when building your Xamarin IOS project, check that you are building against an ios simulator.

Visual Studio defaults to Device as a build target when creating a new project so this could be what is causing your error.

visual studio set to Device build target

Change to a simulator instead and try again.

Build target set to a simulator

If you do intend to deploy to a Device though, then the error is telling you that you haven’t set up a Device properly.

In order to do that you have to sign up to the Apple developer programme and follow the instructions.