"A development profile is required"

OK, the never-ending story. I have had absolutely 0% success in building a single iOS app using any version of Xojo or Xcode.
Now trying again, this time on a new Mac (not to be tainted by old Xcode installations), just downloaded Xcode 8.3, Xojo 2017r1 and running 10.12.3 (did not upgrade to 10.2.4). Still the same problem as before - I cannot build a single app.
Xojo gives the same error message as before “A development profile is required when building an iOS application.”
Firing up Xcode and I am able to build and deploy a sample application to my phone.
Xojo IDE shows my Team profile in the menu.

Is there a way to help you troubleshoot this?

Do you have the com.company.whatever-app matching what the profile was created with? I just went through creating a new profile recently because one of my old apps didn’t work. I renewed the profile on the apple portal and after following all the steps in the docs it still didn’t work.

Then I realized my names didn’t quite match. I am not sure if something changed, or when it used to work there was something different about my profiles or Xojo or ???, but fixing that name so it matched exactly made it work.

Other than that I pretty much followed the docs whichI can’t remember how I found, but they’re there somewhere. Maybe searching for profile or adhoc or something iOS deployment related will bring them up.

OK - finally got this working (on one project, but still).
Found a clue here: https://forums.developer.apple.com/thread/25092
When I run a project from Xcode, the compiler asks for permission to access the private key. When I run from Xojo, I don’t get this question. Never thought about this until now.
I solved this by going to Keychain -> Keys -> right-click on my iOS signing keys -> Get Info -> Access Control
Xcode already listed here. I first tried to add Xojo, but no luck. Selecting “Allow all applications…” made Xojo compiles work!

I really don’t like that settings so digging around I see that /usr/bin/codesign is the application that is used to code-sign on Mac. I added that to “Always allow access” (which IMHO is as insecure as “Allow all applications…” since this means that any app that run a bash-script can code-sign an app in my company’s name…)

Finally!

That’s interesting. I’ve never had to do that. Looking through my keychain I see that some of my iOS certs have codesign allowed and some of them don’t. I can only guess that there was a popup dialog at some point that asked for permission and I granted it, but I don’t remember for sure.