XCode 升级到 XCode10.3 项目报错

报错信息:
Failed to find or create execution context for description ‘<IBCocoaTouchPlatformToolDescription: 0x7fe0ddceada0> System content for IBCocoaTouchFramework-ElevenAndLater <IBScaleFactorDeviceTypeDescription: 0x7fe0dd8606b0> scaleFactor=2x’. These intermediate objects were non-nil: (

详细信息:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
CompileStoryboard /Users/xingcheng/Git/XDemo/XDemo/Launch\ Screen.storyboard (in target: XDemo)
cd /Users/xingcheng/Git/XDemo
export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin/..
/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --module XDemo --output-partial-info-plist /Users/xingcheng/Library/Developer/Xcode/DerivedData/XDemo-aeprheuvgyqhvydumnpjaqtvqwtq/Build/Intermediates.noindex/XDemo.build/Debug-iphonesimulator/XDemo.build/Launch\ Screen-SBPartialInfo.plist --auto-activate-custom-fonts --target-device iphone --target-device ipad --minimum-deployment-target 9.0 --output-format human-readable-text --compilation-directory /Users/xingcheng/Library/Developer/Xcode/DerivedData/XDemo-aeprheuvgyqhvydumnpjaqtvqwtq/Build/Intermediates.noindex/XDemo.build/Debug-iphonesimulator/XDemo.build /Users/xingcheng/Git/XDemo/XDemo/Launch\ Screen.storyboard

2019-07-26 11:15:26.166 ibtoold[35829:13410674] [MT] IBPlatformTool: *** Failed to launch tool with description <IBCocoaTouchPlatformToolDescription: 0x7fe0ddceada0> System content for IBCocoaTouchFramework-ElevenAndLater <IBScaleFactorDeviceTypeDescription: 0x7fe0dd8606b0> scaleFactor=2x: Failed to find or create execution context for description '<IBCocoaTouchPlatformToolDescription: 0x7fe0ddceada0> System content for IBCocoaTouchFramework-ElevenAndLater <IBScaleFactorDeviceTypeDescription: 0x7fe0dd8606b0> scaleFactor=2x'. These intermediate objects were non-nil: (
"IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x)",
"iOS 12.4 (12.4 - 16G73) - com.apple.CoreSimulator.SimRuntime.iOS-12-4"
): Failed to find a suitable device for the type IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) with runtime iOS 12.4 (12.4 - 16G73) - com.apple.CoreSimulator.SimRuntime.iOS-12-4 (Failure reason: Failed to create new simulator device that matches IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) for runtime iOS 12.4 (12.4 - 16G73) - com.apple.CoreSimulator.SimRuntime.iOS-12-4 (Invalid runtime: com.apple.CoreSimulator.SimRuntime.iOS-12-4)): Invalid runtime: com.apple.CoreSimulator.SimRuntime.iOS-12-4
/* com.apple.ibtool.errors */
/Users/xingcheng/Git/XDemo/XDemo/Launch Screen.storyboard: error: Failed to find or create execution context for description '<IBCocoaTouchPlatformToolDescription: 0x7fe0ddceada0> System content for IBCocoaTouchFramework-ElevenAndLater <IBScaleFactorDeviceTypeDescription: 0x7fe0dd8606b0> scaleFactor=2x'. These intermediate objects were non-nil: (
"IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x)",
"iOS 12.4 (12.4 - 16G73) - com.apple.CoreSimulator.SimRuntime.iOS-12-4"
)
Underlying Errors:
Description: Failed to find a suitable device for the type IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) with runtime iOS 12.4 (12.4 - 16G73) - com.apple.CoreSimulator.SimRuntime.iOS-12-4
Failure Reason: Failed to create new simulator device that matches IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) for runtime iOS 12.4 (12.4 - 16G73) - com.apple.CoreSimulator.SimRuntime.iOS-12-4 (Invalid runtime: com.apple.CoreSimulator.SimRuntime.iOS-12-4)
Underlying Errors:
Description: Invalid runtime: com.apple.CoreSimulator.SimRuntime.iOS-12-4

解决方法:

Kill all simulator processes

1
$ sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService

Set the correct Xcode path

1
$ sudo xcode-select -s  /Applications/Xcode.app/Contents/Developer

If that doesn’t work, reset all simulators

1
$ xcrun simctl erase all
Bagikan Komentar