if you have experienced a similar error, try my method and see if you can solve it. The error case diagram is as follows:
- according to my experience, the cause of this problem is that I mistakenly reset the keychain access to the default, so I lost my development certificate.
- how do I solve this problem?
- I clean up my apple development certificate from Keychain Access
- I clean up my apple development private key
- and I get a new error: Revoke certificate Your account already has an Apple Development signing certificate for this machine, But its private key is not installed in your keychain. Xcode can create a new one after revoking your existing certificate.
- relocates to Xcode-> Preferences-> The Accounts tags – & gt; Find team name -> under Apple ID; Double-click on it – & gt; Click the + button in the bottom left corner of the box -> Select App Development
- in the project -> Signing & Capabilities-> From the Team drop-down menu, select “None”
- to re-select the correct development Team
- to rebuild the CMD + b project
- by shift + CMD + k clean project