xcodebuild -list can not find scheme which existed
Asked Answered
J

2

11

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.

Jacoby answered 17/11, 2011 at 8:47 Comment(0)
C
5

I've found that for -scheme builds to work correctly you need to have the project.xcworkspace/ directory in place within the .xcodeproj directory. The project.xcworkspace/ directory should have a contents.xcworkspacedata file within it.

In my case, the project.xcworkspace/ directory wasn't it the git repository because it wasn't previously necessary so I had *.xcworkspace in my .gitignore file.

Confined answered 25/9, 2012 at 5:15 Comment(0)
G
0

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

Ginnie answered 20/6, 2016 at 2:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.