If you are seeing this error when building a Flutter app for a physical iOS device, here is the solution.
CodePudding user response:
I had this error when building for a physical iOS device in Flutter or in the Runner.xcworkspace project. I spent probably 8-9 hours trying to remedy this error, following countless tutorials and answers on other StackOverflow questions. NOTHING worked.
Today, I coincidentally found the solution (in my case) and it may be the one for you if you're experiencing this error since Apple changed their Developer Relations Intermediate Certificate.
Open
Keychain Access, selectloginon the left pane, selectCertificatesat the top, searchapple, delete all:Apple Distribution certificates
Apple Development certificates
Apple Worldwide Developer Relations Certification Authority certificates
(DO NOT DELETE your
Apple Push ServicescertificatesType in your email (most likely your Apple ID).
Select
Save to Diskand choose yourDownloadsfolder.Go to developer.apple.com.
Click
Account, sign in with your Apple ID / Developer Account.Click
Certificates, IDs & Profiles.Again, revoke any
Development/Distributioncertificates.Click the plus icon, select
Apple DevelopmentUpload the signing request you just made.
Download the certificate.
Click the certificate to add it to your Keychain.
Repeat the bold steps for the
Apple Distributionoption.Open your Xcode workspace.
Click your project, click your Target, click
Signing & CapabilitiesIf you see a red error below your Apple ID, click the button to resolve it.
You should then be good to go! I hope this helped you.


