Code Signing "No account for team" message when signing for different developer account
Solution 1:
The solution for me was to set the team in General settings of the target and in General settings of the Tests.
Solution 2:
For me the solution was to set the team in both General settings AND Build settings.
I'm using xcode 9.
Solution 3:
In my case, the error was caused by obsolete team ID in the project settings. I.e. I got a project from a person long gone. So, I just copied the team ID from error message and used a search within the project in XCode to find where this team ID is. It found me two places in the project settings, I put a new developer id there and the error was gone.
Solution 4:
If you are on Xcode 13, select the project and go to Signing and Capabilities
-tab, there you can change the Team
and Bundle Identifier
: