Xcode 6无法找到模拟器设备并超时

时间:2014-11-26 22:14:26

标签: ios xcode ios-simulator

我已经提交了radar,因为我认为这是一个错误,但我想知道是否有人可以在此期间建议解决方案。

在安装了Xcode的计算机上成功运行数周后,测试将不再执行。似乎Xcode无法再找到模拟器或其设备。从Xcode中的Devices菜单(以及~/Library/Developer/CoreSimulator/Devices中的所有目录)删除模拟器设备并再次添加它们无济于事。

模拟器无法启动,Xcode中不会输出任何错误消息。在Console.app中打开system.log会显示以下消息:

Nov 21 16:21:29 jenkinss-mini.home xcodebuild[51853]: [MT] DVTAssertions: Warning in /SourceCache/IDEFrameworks/IDEFrameworks-6604/IDEFoundation/Testing/OCUnit/IDEOCUnitTestRunner.m:388
    Details:  No baseline file matching runDestinationRecord: {
        localComputer =     {
            busSpeedInMHz = 100;
            cpuCount = 1;
            cpuKind = "Intel Core i5";
            cpuSpeedInMHz = 2500;
            logicalCPUCoresPerPackage = 4;
            modelCode = "Macmini6,1";
            physicalCPUCoresPerPackage = 2;
            platformIdentifier = "com.apple.platform.macosx";
        };
        targetArchitecture = i386;
        targetDevice =     {
            modelCode = "iPhone5,1";
            platformIdentifier = "com.apple.platform.iphonesimulator";
        };
    }
    Object:   <Xcode3OCUnitTestRunner: 0x7fa0d6b61550>
    Method:   -_scheduledTestArgumentsOperationForBuildParameters:launchParameters:runDestination:workspace:testRunIdentifier:testRunIdentifiers:actionResultsBundleWithBaselineOverridesFilePath:error:completionBlock:
    Thread:   <NSThread: 0x7fa0d0514030>{name = (null), num = 1}
    Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.

1 个答案:

答案 0 :(得分:9)

不建议删除〜/ Library / Developer / CoreSimulator / Devices中的设备,因为您可能正在运行时从CoreSimulatorService下删除状态。我建议你通过以下方式“清理”:

  1. 使用sim
  2. 退出Xcode,iOS模拟器,乐器和其他任何内容
  3. 终止服务:killall -9 com.apple.CoreSimulator.CoreSimulatorService
  4. 删除状态:rm -rf ~/Library/*/CoreSimulator
  5. 这应该让你回到一个香草州。

    如果这不能完全解决您的问题,请在重现问题后使用〜/ Library / Logs / CoreSimulator / CoreSimulator.log更新您的问题。请注意,您应首先启用调试日志记录:

    defaults write com.apple.iphonesimulator DebugLogging -bool YES
    defaults write com.apple.CoreSimulator DebugLogging -bool YES