Not able to build the app for the iOS

When build the app for the ios, I got the below error.

UserError: error: No certificate for team ‘XXXXXXXXX’ matching ‘iPhone Developer: XXXXXX XXXXXX (XXXXXX )’ found: Select a different signing certificate for CODE_SIGN_IDENTITY, a team that matches your selected certificate, or switch to automatic provisioning. (in target 'XXXXXX ’ from project 'XXXXXX ')

But it was working on last 2 weeks before with the same certificates & provisioning files. Both certificates & provisioning files have the proper files. still it shows the same error.

That message comes directly from Xcode. I find when I get this the best solution is to get fresh certificates for your project. That way you can be sure you are using the right ones.