The project named "Foo does not contain a scheme named "Bar" bitrise.io

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.

  1. From the menu bar, select Product > Scheme > Manage Schemes
  2. Ensure the 'Shared' box is checked for that scheme
  3. A new .xcscheme file has been created in your project at
    WorkspaceName.xcworkspace/xcshareddata/xcschemes.
  4. Commit this file to your repository

If you don't use cocoapods in your project you should remove .xcworkspace file from ./ios directory.