I have xcode project, I want to build this project under command line, this project composed many sub-project, first I fetch these source files to local disk, I use xcodebuild -list to find scheme, I can not find anything, while after I manually open this project with xcode and then use xcodebuild -list to find scheme, some scheme can be seen.
I compare the project file of these two scenario, for the second project, there existed xcuserdata folder, so I can find the scheme, the problem I need use scheme to build this project.
Any suggestion will be appreciated.
I've found that for
-schemebuilds to work correctly you need to have theproject.xcworkspace/directory in place within the.xcodeprojdirectory. Theproject.xcworkspace/directory should have acontents.xcworkspacedatafile within it.In my case, the
project.xcworkspace/directory wasn't it the git repository because it wasn't previously necessary so I had*.xcworkspacein my.gitignorefile.