Message from debugger: Terminated due to code signing error

I got the message in the title when I made a new provisioning profile for this year which has a privileged file operations profile because the old one expired and the Mac app wouldn't build. Before this, I also had to get new Mac installer and Apple distribution certs which I would assume are in the prov profile since I made it after the new certs.

After importing the new prov profile, the app builds, but app won't run because of message in title. I also had to do this in 2020 and 2021, but creating a new prov profile and importing it into XCode was all I had to do - everything just worked.

In Xcode the 2021 and 2022 profiles look like they have the same content except the 2022 one isn't expired and has the latest cert. So why am I getting "Message from debugger: Terminated due to code signing error" when updating it this year?

Larry

Message from debugger: Terminated due to code signing error
 
 
Q