Solution skill
The project named "Foo does not contain a scheme named "Bar" bitrise.io
Complete solution
Shows how to fix the project named "Foo does not contain a scheme named "Bar" bitrise.io. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
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.
Steps
- 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. From the menu bar, select Product > Scheme > Manage Schemes Ensure the 'Shared' box is checked for that scheme A new .xcscheme file has been created in your project at WorkspaceName.xcworkspace/xcshareddata/xcschemes. Commit this file to your repository
When to use
You are seeing this: To your schema be visible for command-line build you must mark it as a shared scheme. Use this skill when you run into "The project named "Foo does not contain a scheme named "Bar" bitrise.io".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: 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
Verified resolution: 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. From the menu bar, select Product > Scheme > Manage Schemes Ensure the 'Shared' box is checked for that scheme A new .xcscheme file has been created in your project at WorkspaceName.xcworkspace/xcshareddata/xcschemes. Commit this file to your repository
Source URL: https://stackoverflow.com/questions/33521526/the-project-named-foo-does-not-contain-a-scheme-named-bar-bitrise-io
By @issueatlas · Version 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_vG-o27M0PU6JOYZzv6wosQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">The project named "Foo does not contain a scheme named "Bar" bitrise.io <span>— Vectle</span></a>