2016-10-11 81 views
17

我在teamcity的构建日志中有警告。我已经更新了我的CI-Server上的Xcode从7.3.1到8.该步骤运行成功,但我有:我该如何解决此警告:CoreSimulator试图卸载陈旧的CoreSimulatorService作业

[Step 3/3] Starting: /Users/teamcity/local/teamcity-build-agent/temp/agentTmp/custom_scriptxxxxxxx 
[Step 3/3] in directory: /Users/teamcity/local/teamcity-build-agent/work/yyyy 
[Step 3/3] 2016-10-11 09:04:41.706 xcodebuild[18180:5010256] CoreSimulator is attempting to unload a stale CoreSimulatorService job. Detected Xcode.app relocation or CoreSimulatorService version change. Framework path (/Applications/Xcodes/Xcode_8.0.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework) and version (303.8) does not match existing job path (/Applications/Xcodes/Xcode-7.3.1.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc) and version (209.19). 
[Step 3/3] 2016-10-11 09:04:41.961 xcodebuild[18180:5010256] Failed to locate a valid instance of CoreSimulatorService in the bootstrap. Adding it now. 

我该如何解决此警告?

回答

52

我有同样的问题。我必须在我的Jenkins服务器上运行Xcode 7(构建旧版本)和Xcode 8(构建当前的开发分支),而且我一直在遇到这个问题。

解决方案:

launchctl remove com.apple.CoreSimulator.CoreSimulatorService || true 

这是因为,即使你退出模拟器的应用程序,该服务仍然在运行。需要上述命令才能删除名为com.apple.CoreSimulator.CoreSimulatorService的服务。 || true是为了避免该服务未运行时发生故障。

+1

爱找到像这样的快速解决方案 - 谢谢 – RichAppz

+0

你能解释它为什么发生?根源是什么? – Doro

+0

完美的谢谢! – SteMa

0

遇到了同样的问题,解决了以下步骤:

  1. 复制的Xcode应用程序文件夹到另一个位置
  2. 删除留在应用程序中复制&确保没有Xcode中的副本保留
  3. 将副本从步骤1移回应用程序文件夹
  4. 重新启动的机器

似乎没有设置某个值,因为Xcode没有通过App Store安装。

+0

这不是一个很好的解决方案在CI的情况下 – sabujp

相关问题