I can vouch that this fixed my issue. I was stuck in a week with same error of codesigning. I thought it's because the devices changed to new keys because the device ID were new. The reason for the error because the project is inside a cloud folder. I moved it to a local folder in downloads and it finally fixed the problem. I've been in a loop of flutter clean, flutter pub get, pod install for a week yet the fix was so simple.