今天,我已将 iMac 从 macOS High Sierra 更新为 macOS Mojave。从那以后我无法打开模拟器。每次我试图打开立即崩溃的模拟器。每当我尝试通过 Xcode 运行模拟器时,Xcode 都会显示此错误
等待 iphonesimulator 的模拟器应用程序准备就绪时超时
另外,我尝试直接打开模拟器,它立即崩溃。这里是gif(gif有点慢) -
系统 CPU 和内存状态-
这是我尝试过但没有运气的一些解决方案 -
清除 iPhone 模拟器缓存
xcrun simctl erase all
清除派生数据
~/Library/Developer/Xcode/DerivedData/
清除 iOS 设备支持
~/Library/Developer/Xcode/iOS DeviceSupport/
删除 Xcode 首选项
defaults delete com.apple.dt.Xcode
重启 Xcode 和系统
更新 1
macOS 日志 -
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Device iPhone XS (978302BA-5255-44CB-A77C-188071B99A7C, iOS 12.0, Booted) is available but has no defaultDisplay'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff33a9543d __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff5f9a6720 objc_exception_throw + 48
2 CoreFoundation 0x00007fff33ab008e +[NSException raise:format:arguments:] + 98
3 Foundation 0x00007fff35e4c55d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4 Simulator 0x000000010e7510da Simulator + 106714
5 libdispatch.dylib 0x00007fff60a24d4f _dispatch_call_block_and_release + 12
6 libdispatch.dylib 0x00007fff60a25dcb _dispatch_client_callout + 8
7 libdispatch.dylib 0x00007fff60a2c120 _dispatch_lane_serial_drain + <…>
)