For me, this was a mismatch between the name of the executable file, as indicated in the "Product Name" in the settings of the target assembly, and the name of the executable file specified in Info.plist. In fact, when you duplicate the target, you get the โcopyโ suffix, which you usually change immediately, and this can lead to some errors.
An additional indication of this discrepancy may be visible when you select a product application in Xcode and open it in Finder. If the application icon is superimposed using the stop sign, here it is, your application is not executable.
source share