使用 xcodebuild 构建等待/“runContextManager.runContexts” 超时
我正在设置我的 iphone 项目以与 hudson 一起运行,我的构建脚本在本地运行良好,但是当在我的雪豹服务器 mac 上执行以下命令时,
xcodebuild -sdk iphoneos4.3 -workspace Moments.xcworkspace/ -scheme Moments -configuration DistributionTest
我收到以下错误消息。
从命令行构建设置: SDKROOT=iphoneos4.3
2011-05-11 10:32:17.729 xcodebuild[4151:903] 警告:等待 /"runContextManager.runContexts" 超时(已过去 10.010780 秒) xcodebuild:错误:工作区“Moments.xcworkspace/”不包含名为“Moments”的方案。
超时是怎么回事?!为什么它找不到名为 Moments 的方案,而它确实存在。如果我在构建服务器上的 xcode 中打开工作区,我可以看到该方案。
I am setting up my iphone project to run with hudson, my build script works fine locally, but when executing the following command on my snow leopard server mac
xcodebuild -sdk iphoneos4.3 -workspace Moments.xcworkspace/ -scheme Moments -configuration DistributionTest
I get the following error messages.
Build settings from command line:
SDKROOT = iphoneos4.32011-05-11 10:32:17.729 xcodebuild[4151:903] WARNING: Timed out waiting for /"runContextManager.runContexts" (10.010780 seconds elapsed)
xcodebuild: error: The workspace 'Moments.xcworkspace/' does not contain a scheme named 'Moments'.
What's the timeout about?! And why can't it find the scheme named Moments when it's definitly there. If I open the workspace in xcode on the build server, I can see the scheme.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
检查“管理方案”对话框中的“共享”框会将方案移动到 Project.xcodeproj/xcshareddata/xcschemes/Scheme.xcscheme,
因此即使您有一个从未通过 xcode ui 打开的干净结帐,这也将起作用。我们使用它以便 buildbot 可以构建我们的应用程序
checking the "shared" box in the "Manage Schemes" dialog moves the schemes to Project.xcodeproj/xcshareddata/xcschemes/Scheme.xcscheme
so even if you have a clean checkout that has never been opened via the xcode ui, this will work. we use this so that buildbot can build our apps
不幸的是,xcodebuild 依赖于 XCode 生成的一些每个用户文件。要解决此问题,您可以以 hudson 用户身份登录并运行 XCode UI 一次。这将创建必要的文件。
我目前正在尝试解决此问题,但在构建之前将所需的文件复制到源树中。
如果你运行xcodebuild并且XCode在后台运行,xcodebuild将联系XCode来获取所需的数据。由于 XCode 未运行,因此会出现超时。
Unfortunately xcodebuild depends on some per user files generated by the XCode. To fix this you can log in as your hudson user and run the XCode UI once. That will create the necessary files.
I'm currently trying to work around this, but copying the needed files into the source tree before building.
If you run xcodebuild and XCode is running in the background, xcodebuild will contact XCode to get the needed data. Since XCode is not running, you get the timeout.
默认情况下,方案不在用户(和您的构建服务器)之间共享。正如 David 提到的,您可以共享它们,但您也可以只调用共享的目标。
因此,
不会出现这种情况。
方案的名称通常与目标的名称相同,因此
Schemes are per default not shared between users (and your build-server). As David mentions, you can share them, but you can also just invoke the targets instead, which are shared.
So instead of
it'd be
since schemes are normally named the same as the target.