I just configure a project in bitrise.io. But the xcode-build fails with error:
xcodebuild: error: The project named "Foo" does not contain a scheme named "Bar". The "-list" option can be used to find the names of the schemes in the project.
I double check and the scheme Bar does exist in the project Foo
Based on the Bryan Mussial answer
The root cause is that the default behavior of Schemes is to keep schemes 'private' until they are specifically marked as shared. In the case of a command-line initiated build, the Xcode UI never runs and the xcoderun tool doesn't have its own cache of Schemes to work with.
To your schema be visible for command-line build you must mark it as a shared scheme.