Gregs link brought me on the right track on how to install the missing intermediate certificate.
(btw - I have Xcode 12.4 installed).
I had to download the WWDR Certificate from www.apple.com/certificateauthority and then install it through the terminal. Simply doubleclicking it would result in an errormessage from the keychain app.
Just a quick&dirty test app, which is making use of MBS plugins for iOS. I enter a search term and the app is querying a remote CubeSQLServer and returns the label of the first matching record.
It looks like we finally have a very easy way to build our inhouse apps!
There is also middle way, something called Apple Business account. Where you put on the app store and can then select what customers can get it. (Supposedly).
But it is hard to find much about it. Bellow are things I had bookmarked about it when I last time looked into it:
Despite having a valid Apple WWDR CA certificate that was good until 2023 I followed the above help and installed a new Apple WWDR CA certificate. That worked. Then I created and downloaded new iOS Development Certificate and new mobile provisioning profile. Same error message. Checking I find that Keychain Access shows the new iOS Development Certificate as not trusted. So therein lies the problem. Not sure what to do next.
So I found the secret. Apple have released a large number of Apple WWDR CA certificate versions (the so called intermediate certificate). I found an Apple document that says use the one the expires in 2030. That is the one with G3 at the end of the name (they go up to G6). I had previously assumed I should use the latest G6. Wrong.
I just downloaded the G3 version certificate, created and downloaded a new iOS Development Certificate successfully, created a new profile and Xojo built my app.
By the way the certificate installed just by double-clicking it for me.
Now on to the next issue.