Development Profile & Provisioning Profile

After several frustrating days trying to get a new app to run on a test iPhone I need to call in help.
I am going around and around in circles trying to get the combination of xojo (to build the app) and Xcode (to load the app onto the test device).
It has worked before with other apps but nothing seems to work now and despite reading many historic comments on this forum, I can’t make it work.
I’ve tried revoking all development certificates from the dev.apple website and re creating them, together with re-generating the associated provisioning certificates.
I’ve tried removing all certificates (development ones, not sure where the provisioning certificates hide) from Key Chain.
I’ve tried creating them in dev.apple and downloading them to xCode.
I’ve tried creating them in Xcode and watching them appear in KeyChain.
I’ve tried using wildcard bundleIDs (com.company.*).

It seems I go through the same process each time

  1. Having recreated the certificates - restart Xojo, re-build the app in Xojo - which responds that a development certificate is required - even though I have selected a Team in Code Signing - which I have to assume means the development certificate.
  2. Recreate the development certificates again - not sure which one fixes this particular problem but eventually it magically builds in Xojo.
  3. Restart Xcode - go to Devices and try to download the newly built app - which now says it needs a valid Provisioning profile - which has already been downloaded and double clicked into Xcode, but you can’t see the thing anywhere to confirm.

I really wish there was a clean approach to this. Perhaps using consistent terminology between Apple and Xojo would help to start and some description of what certificates are needed where so that we can easily check they are in place.

Did you verify the profile is on the device? In Xcode Devices, right click on device and select “Show Provisioning Profiles”. You can remove old ones or add new ones that you’ve downloaded using the +/- buttons.

Another suggestion is to revoke everything and try again from a different user account in case something in the Keychain is hosed.

Thanks Paul, I’m going around the loop again.
I deleted all the provisioning profiles from the Device.
I deleted all the certificates in KeyChain
I revoked the development profile from dev.apple
I deleted the provisioning profiles from dev.apple
I created a new development profile - downloaded and double clicked.
I created a new provisioning profile - linked to the device and the app (wildcard) - downloaded and double clicked.
I restarted Xojo, added the team to the code signing - ran Build and now it want a development profile again - but I just gave it one!

Not tried a new user account yet. Too painful. Any other suggestions please…

I’ve done this dozens of times on different machines and VMs using different dev accounts. Revoke and redo has always worked for me when I’ve run into issues.

The only other thing I can think of that has helped others is that you try building a dummy app in Xcode. That sometimes puts things in the “proper” places.

I’ve tried that in the past as well, and it has worked, but not this time.
But I get a clue - when I try to build a New Project in Xcode it responds with “the certificate used to sign “test” has either expired or has been revoked”. So at least it is consistent with Xojo. But the certificate is new, I can see it in KeyChain, it has a sell by date of one years time…

I thought based on above that clearing out the Keychains would be a winner - no such luck. No I have to re-enter all my passwords again - probably take months.