Xcode fails to run on device after cancelling Keychain access popup
I have an Xcode project which I built, deployed and released successfully for more than a year. Today, while working on it, Xcode popped up a permission dialog for accessing a keychain item. Stupid me hit the escape key. Starting from this time, all attmepts to run the project on a device failed with the error
A valid provisioning profile for this executable was not found.
So somehow I seem to have locked Xcode from accessing the provisioning profile data in the keychain. Is there a way to let Xcode re-ask me for access permission?
The project is configured to "automatically manage signing"; I have selected the correct team, and the provisioning profile info in the project settings shows all checkmarks, no issues.
So far I tried:
- unpair the device
- restart Xcode
- restart computer
- remove and re-add dev account (as suggested in the comments, thx @Paulw11)
- change the bundle id (as suggested in the comments, thx @matt)
- lock/unlock keychain (as suggested in the answer linked by @matt, thx again)
Please not, this question is not a duplicate of the many questions about how to run an app which contain the same error message (e.g. this one). My project setup is sound and used to work for months, and the current state of the codebase was runnable on a device 15 minutes ago, before the damn keychain popup incident.
Oh, and P.S.: I hate Xcode. Feel free to downvote me for this outburst of emotion, but it's a fact.