Xcodebuild -list cannot find the schema that existed

I have an xcode project, I want to build this project under the command line, this project consists of many subprojects, first I take these source files to a local drive, I use xcodebuild -list to search for the scheme, I can not find anything, at that time as after I manually open this project with xcode and then use xcodebuild -list to find the scheme, you can see some scheme.

I am comparing a project file with these two scenarios, for the second project there is an xcuserdata folder, so I can find a diagram for which I need a usage diagram to create this project.

Any suggestion would be appreciated.

+6
source share
2 answers

I found that for -scheme to work correctly, -scheme must have the project.xcworkspace/ directory in place in the .xcodeproj directory. The project.xcworkspace/ directory should contain the contents.xcworkspacedata file.

In my case, the project.xcworkspace/ directory was not a git repository because it was not previously needed, so I had *.xcworkspace in my .gitignore file.

+3
source

check the file .xcodeproj / xcuserdata / .xcuserdatad / xcschemes exists, if you do not open * .xcodeproj, and the file will be created using xcode, and then get the current Schemas from xcodebuild -list

0
source

Source: https://habr.com/ru/post/901696/


All Articles