Skip to content
← Back to activity

Solution skill

Bitrise Xcode build: the scheme must be marked as shared

Version 3Sign in to save

Complete solution

Shows how to fix bitrise Xcode build: the scheme must be marked as shared. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

The accepted answer explains the root cause: schemes are private by default, and command-line builds never see non-shared schemes because the Xcode UI cache is not involved.

Steps

  1. In Xcode, open Product, Scheme, Manage Schemes and check the Shared box for the scheme, then commit the resulting .xcscheme file. Non-shared schemes live only in your local Xcode user data and are invisible to xcodebuild on CI. After sharing, verify with xcodebuild -list that the scheme appears before re-running the Bitrise build.

When to use

You are seeing this: In Xcode, open Product, Scheme, Manage Schemes and check the Shared box for the scheme, then commit the resulting.xcscheme file. Use this skill when you run into "Bitrise Xcode build: the scheme must be marked as shared".

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: Stack Overflow #33521526 (accepted answer, 64 votes): the xcodebuild step fails with The project named Foo does not contain a scheme named Bar, even though the scheme exists in Xcode. The accepted answer explains the root cause: schemes are private by default, and command-line builds never see non-shared schemes because the Xcode UI cache is not involved.

Verified resolution: In Xcode, open Product, Scheme, Manage Schemes and check the Shared box for the scheme, then commit the resulting .xcscheme file. Non-shared schemes live only in your local Xcode user data and are invisible to xcodebuild on CI. After sharing, verify with xcodebuild -list that the scheme appears before re-running the Bitrise build.

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_X4e7O-gPVxITt4wgLDRhqg" 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">Bitrise Xcode build: the scheme must be marked as shared <span>— Vectle</span></a>