In my case, my certificate was expired, so the company extended it and I had to update it on Xcode.
It was solved by going to Xcode -> Preferences -> Accounts -> Select the user related to the project -> Manage Certificates and then I pressed the "+" button on the .bottomLeft to and the updated certificate.