2

Sometimes when I reopen an existing Swift UI project in Xcode 12, the component preview pane fails to display previews of components and displays the following error message instead:

NoBuildableEntriesError: active scheme does not build this file Select a scheme that builds a target which contains the current file, or add this file to a target that is built by the current scheme. 

How can I resolve this and prevent it from happening again?

In particular, how can I:

  1. "select a scheme that builds a target which contains the current file", and/or
  2. "add this file to a target that is built by the current scheme."

1 Answer 1

0

Below is the Scheme it is at the very top of Xcode you can click it to change it. Scheme

And the membership is in the file inspector. Just click the Target you want.

Target Membership

My CustomPicker.swift files does NOT belong to StackOverflow14-Multi (macOS)

Sign up to request clarification or add additional context in comments.

2 Comments

So Target = Scheme?
A part of the Scheme has many options you can Edit Scheme and change many settings. The names match.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.