【问题标题】:Xcode 6 is unable to find Simulator device and times outXcode 6 无法找到模拟器设备并超时
【发布时间】:2015-01-25 09:52:36
【问题描述】:

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

在安装了 Xcode 的机器上成功定期运行测试数周后,测试将不再执行。 Xcode 似乎无法再找到模拟器或其设备。从 Xcode 的 Devices 菜单中删除 Simulator 设备(以及 ~/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.

【问题讨论】:

标签: ios xcode ios-simulator


【解决方案1】:

不建议删除 ~/Library/Developer/CoreSimulator/Devices 中的设备,因为您可能会在运行时从 CoreSimulatorService 下删除状态。我建议您通过执行以下操作“清理”:

  1. 使用 sim 退出 Xcode、iOS 模拟器、仪器和其他任何东西
  2. 杀死服务:killall -9 com.apple.CoreSimulator.CoreSimulatorService
  3. 删除状态:rm -rf ~/Library/*/CoreSimulator

这应该会让你回到原版状态。

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

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

【讨论】:

    猜你喜欢
    • 2014-11-26
    • 1970-01-01
    • 2021-03-28
    • 2017-08-25
    • 2014-11-30
    • 1970-01-01
    • 2014-07-23
    • 2016-03-08
    • 2019-03-17
    相关资源
    最近更新 更多