1

I'm not sure why this is so difficult/hard to find any documentation for but I'm trying to add an initial target to a scheme for my workspace.

I created a new workspace, added some files, made a new scheme named "Default" but when I try to use it I get the error code "Scheme Default is not currently configured for the build action."

I can't find any docs on how to add a target. Target is grayed out in File > New > Target and when I try to add one with the "+" button in the "Edit Scheme" menu it just shows an empty list with a search option that is obviously going to be blank.

I've heard that Xcode is a nightmare to work with but I can't understand why I can't just add a target.

1 Answer 1

3

You can only add a new Target to an existing Project. If you start with a Workspace, it has no projects in it.

  • Go to File -> New and select Project...
  • Select the type of Project (such as Single View App)
  • Give your project a Name, and specify options (Team, Organization, Language, etc)
  • Select Next, and you're presented with a Where to Create window
  • At the bottom you should see an option for Add To:

enter image description here

From that drop-down, select your current Workspace

enter image description here

In this image, I already have HelloCpp project open, and I have wkplace Workspace open.

If I choose wkplace, this new project will be added to my Workspace and the Project and Target will be automatically added.


Edit:

Here is the full step-by-step.

New empty Workspace - named WorkSpace1:

enter image description here

Selected File -> New -> Project... then Selected Single View App, clicked Next:

enter image description here

Entered MyNewApp as the Product Name and clicked Next:

enter image description here

Selected WorkSpace1 from the Add To: drop-down, and clicked Create:

enter image description here

And I'm taken back to my WorkSpace1 window, with the new Project and Target showing:

enter image description here

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

7 Comments

Thanks for the heads up, unfortunately even after adding a project I still can't add a Target. It is still grayed out as before.
Also there was no target created with the new project.
You followed those steps? Was a new Project created - projname.xcodeproj?
Yup. I have a new project and still no Target.
Hmmm... I edited my answer with step-by-step screen caps. Failing that, you can drag your projname.xcodeproj file from Finder into the Navigator pane of your open Workspace... It should bring its "target" with it.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.