16

After downloading from Apple's site and installing Xcode 9 beta 2, it fails to launch on Sierra OS X version 10.12.5 with a following bug report:

Process: Xcode [4789] Path:
/Applications/Xcode-beta.app/Contents/MacOS/Xcode Identifier:
com.apple.dt.Xcode Version: 9.0 (13158.29) Build Info:
IDEFrameworks-13158029000000000~6 Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: Xcode [4789] User ID: 501

Date/Time: 2017-07-10 09:27:38.822 +0300 OS Version:
Mac OS X 10.12.5 (16F73) Report Version: 12 Anonymous UUID:
D8406E47-CD80-D96B-2976-599E84980DE2

Sleep/Wake UUID: A8F0AF0B-2FF1-45A9-89AD-505F25730705

Time Awake Since Boot: 20000 seconds Time Since Wake: 3800 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT) Exception Codes:
0x0000000000000000, 0x0000000000000000 Exception Note:
EXC_CORPSE_NOTIFY

Application Specific Information: ProductBuildVersion: 9M137d UNCAUGHT EXCEPTION (NSInternalInconsistencyException): Error getting value for parameter key 'name' of extension 'Xcode.InterfaceBuilderKit.PepperIntegration.Singletons' in plug-in 'com.apple.dt.IDE.IDEInterfaceBuilderWatchKitIntegration' UserInfo: { NSUnderlyingError = "Error Domain=DVTPlugInErrorDomain Code=2 \"Loading a plug-in failed.\" UserInfo={DVTPlugInIdentifierErrorKey=com.apple.dt.IDE.IDEInterfaceBuilderCocoaTouchIntegration, DVTPlugInExecutablePathErrorKey=/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration, NSLocalizedRecoverySuggestion=The plug-in or one of its prerequisite plug-ins may be missing or damaged and may need to be reinstalled., DVTPlugInDYLDErrorMessageErrorKey=dlopen(/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration, 0): Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator\n Referenced from: /Applications/Xcode-beta.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit\n Reason: image not found, NSLocalizedDescription=Loading a plug-in failed., NSFilePath=/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework, NSLocalizedFailureReason=The plug-in \U201ccom.apple.dt.IDE.IDEInterfaceBuilderCocoaTouchIntegration\U201d at path \U201c/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework\U201d could not be loaded. The plug-in or one of its prerequisite plug-ins may be missing or damaged., NSUnderlyingError=0x7fc8df3cb340 {Error Domain=NSCocoaErrorDomain Code=3587 \"dlopen_preflight(/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration): Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator\n Referenced from: /Applications/Xcode-beta.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit\n Reason: image not found\" UserInfo={NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration, NSDebugDescription=dlopen_preflight(/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration): Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator\n Referenced from: /Applications/Xcode-beta.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit\n Reason: image not found, NSBundlePath=/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework, NSLocalizedDescription=The bundle \U201cIDEInterfaceBuilderCocoaTouchIntegration\U201d couldn\U2019t be loaded because it is damaged or missing necessary resources.}}}"; }

Ievgen
  • 1,999
  • 2
  • 12
  • 24

1 Answers1

73

I had the same issue. I have reinstalled XcodeSystemResources.pkg package. You will find it in here:

/Applications/Xcode.app/Contents/Resources/Packages/XcodeSys‌​temResources.pkg

The installer will recreate /Library/Developer/PrivateFrameworks folder with its content. After that Xcode 9 started working for me.

Bartosz Janda
  • 1,611
  • 11
  • 10
  • 5
    You saved my day. After hours of trial and error finally I have a working Xcode9. Thank you! – Rebeloper Sep 20 '17 at 14:04
  • Thank you! This saved me after a rm -rf mishap – Voxar Oct 03 '17 at 08:55
  • Thanks! I had the same error but for a different extension. Reinstalling the package worked! – Devator Nov 15 '17 at 20:42
  • Thank you so very much! Wow ... I don't know what I'd have done without this answer. BTW, I found the package at /Applications/Xcode.app/Contents/Resources/Packages/XcodeSystemResources.pkg so it is no longer beta. – G. Ken Holman Dec 08 '17 at 15:33
  • This also works for Xcode 11.4. I deleted the app and some of the related files, but missed a few. Upon re-installing Xcode, I continued to get a similar error message. Running `XcodeSystemResources.pkg` cleared my error and I was able to open Xcode, with no problems. Adding this as answer because I don't have 50 reputation points to comment on the above working answer. – AlwinaO. Apr 15 '20 at 23:26
  • Command to run `sudo installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/XcodeSystemResources.pkg -target /Library/Developer/PrivateFrameworks` – Reuben Wedson Sep 26 '22 at 16:27