Ios – xcode 9 crash when open storyboard

iosxcode

XCode 9 GM Candidate 1 is currently crashing when opening a storyboard.

ProductBuildVersion: 9A235

UNCAUGHT EXCEPTION (NSInternalInconsistencyException): Could not find class named UIImage
UserInfo: (null)
Hints: 
  0: Replacement view is installing: <IBStoryboardCanvasViewController: 0x7fdf6d7f7d70 representing: (null)>

Best Answer

For me it was crashing on opening any storyboard or xib in my app. I have created a new single view app project, opened its storyboard without a problem, reopened my own project - and it started opening storyboards and xibs as usual. Probably a caching issue of some sort..

Here are the details of a crash I was experiencing:

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:
Sending _openAs: to <IDEDocumentController: 0x7f944580a970> from <NSMenuItem: 0x7f94249528d0 Interface Builder - Storyboard>
ProductBuildVersion: 9A235
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEInterfaceBuilder/IDEInterfaceBuilder-13196/InterfaceBuilderKit/IssueProvider/IBIssueProvider.m:72
Details:  castedInstance should be an instance inheriting from IBDocument, but it is IDEPegasusSourceEditor.SourceCodeDocument
Object:   <IBIssueProvider: 0x7f94366a73d0>
Method:   -updatedIssuesForDocument:

Another crash that I have experienced, and that got fixed the same way:

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:
Sending openClickedNavigableItemAction: to <IDEStructureNavigator: 0x7ff718acde20 representing: <DVTExtension 0x7ff70acf22e0: Structure Navigator (Xcode.IDEKit.Navigator.Structure) v0.1 from com.apple.dt.IDEKit>> from <IDENavigatorOutlineView: 0x7ff7169ba340>
ProductBuildVersion: 9A235
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-13247/IDEKit/Editor/IDEEditorContext.m:1935
Details:  Unexpected document in IDEDocumentController:<IBXIBDocument: 0x7ff6fb013a00>(  0   -[IDEEditorDocument init] (in IDEKit)