I got the same issue after returning my mac to factory settings and essentially updating it to Big Sur.
You should definitely first check if your schemes are checked as "Shared". Then, in xcode -> preferences -> locations, see if your current version of xcode is selected in the field "Command Line Tools".
Also, make sure that you have a scheme with the exact name that the error is saying ("bar", not "bar.dev"). That scheme can be empty (no actions or anything). Your schemes should also be in the yourappname Workspace (that's when you open "Manage schemes").
Finally what actually fixed it for me was this:
- cd ios
- pod deintegrate
- pod install
- cd ..
- run your app