xcodebuild -list 找不到已存在的方案

发布于 2024-12-16 00:15:04 字数 254 浏览 7 评论 0原文

我有xcode项目,我想在命令行下构建这个项目,这个项目由很多子项目组成,首先我将这些源文件获取到本地磁盘,我使用 xcodebuild -list 来查找方案,我找不到任何东西,而之后我用xcode手动打开这个项目,然后使用xcodebuild -list 查找scheme,可以看到一些scheme。

我比较了这两个场景的项目文件,对于第二个项目,存在xcuserdata文件夹,所以我可以找到方案,我需要使用方案来构建这个项目的问题。

任何建议将不胜感激。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

菊凝晚露 2024-12-23 00:15:04

我发现,要使 -scheme 构建正常工作,您需要在 .xcodeproj 目录中放置 project.xcworkspace/ 目录。 project.xcworkspace/ 目录中应包含一个 contents.xcworkspacedata 文件。

就我而言, project.xcworkspace/ 目录不是 git 存储库,因为以前不需要它,所以我的 中有 *.xcworkspace 。 gitignore 文件。

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.

温柔女人霸气范 2024-12-23 00:15:04

检查文件 .xcodeproj/xcuserdata/.xcuserdatad/xcschemes 是否存在,如果没有打开 *.xcodeproj 并且该文件将由 xcode 创建,然后从 xcodebuild -list 获取当前的方案

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文