Just had this problem and it happened after I had Xcode apply recommended changes to the project. It changed the settings for CODE_SIGN_IDENTITY to "-" from what it was. I changed it to "Apple Developer" at the project level and cleared it at the target levels so they would all use the same setting. Then I cleaned and rebuilt. I was able to launch the app after that.
I've found that recently instead of having iOS Developer and Mac Developer there is now an Apple Developer option which seems to apply to all supported platforms. I expect this is the right option to use going forward.
Topic:
Code Signing
SubTopic:
General
Tags: