In Xcode 10.2, when I build a project to run on the Simulator, it works just fine. But when I click Product -> Archive, it fails with the unhelpful message
fatal: No names found, cannot describe anything
Illegal version:
Command PhaseScriptExecution failed with a nonzero exit code
What is the actual problem here? I've tried the lock & unlock trick with Keychain Access, deleting the DerivedData folder, and restarting the computer, but nothing has worked.