Set default scheme for Xcode project

I have a Mycpp project (with 1 target MyApp) that includes another LibProject project (with two goals, lib and app). I have auto-creation schemes selected in Xcode ui, and when I first open the project, it really creates the schemes, but one of the schemes is selected from the nested LibProject, while I want to select one target / scheme from MyApp. I can change the scheme after the fact, and the user interface is remembered, but I do not want Xcode to have the wrong scheme by default.

The order in which the schemes end:

lib (*with this one selected) app MyApp 

Any idea how to choose the default value for newly created circuits?

+8
xcode
source share
2 answers

I had exactly this problem. We have three projects in one workspace, one of which depends on the other two. To build everything, we build the main project, but, somewhat, but not provably, around the time we switched to Xcode 6, the scheme that appeared when we pulled it would be one of the supporting projects. Even if we changed it to the main project, it will return with every click from git. So, I knew that this was not a user setting that controlled him, but something hidden in a common file, since our user settings file is not in our git registry.

I managed to change it for our workspace. I did three things: -

Firstly, I reordered some file in the main project, just in case it was some kind of hidden project setup, but that didn't work;

Then I noticed that the top-level project was configured for parallel assembly, so I decided that this should not be done, since this requires the output of two other projects. Xcode actually manages this penalty, but it was a way to force the schema file to be modified. This also did not fix this:

My third change was to remove and re-add supporting projects to the workspace; I also canceled the order of the two supporting projects. This final change really made the main project outline for other users, so I think this is the way to do it.

I listed other elements in case it turns out that this is not only one step, and I was lucky due to earlier attempts.

+2
source share

Have you tried Edit Scheme ... or New Scheme ... or Manage Schemes ... in the Xcode product menu. You should be able to edit the scheme as you want, and Xcode will remember it for the project.

enter image description here

+1
source share

All Articles