Getting "libc++abi.dylib: terminating with uncaught exception of type NSException" error

Here is the error

Code Block
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'could not dequeue a view of kind: UICollectionElementKindCell with identifier Cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
*** First throw call stack:
(0x18a2d6a48 0x189ffdfa4 0x18a1d8e88 0x18a60e654 0x18dbd41e0 0x18dbd43c8 0x104a0dea4 0x104a0e6a8 0x18dbc0e74 0x18dbc56f0 0x18dbc9fbc 0x18e7f217c 0x190d5a2c0 0x190d6043c 0x190d6b140 0x190cb3884 0x190cdd574 0x190cddf68 0x18a253e68 0x18a24ed54 0x18a24f320 0x18a24eadc 0x1941ef328 0x18e35c63c 0x104a08c84 0x18a0d8360)
libc++abi.dylib: terminating with uncaught exception of type NSException


This is the code for homeVC.swift (most is just parse backend so ignore)




You may need to follow the instruction in the message.

must register a nib or a class for the identifier or connect a prototype cell in a storyboard

Your code has no code registering the cell class for the reuseIdentifier Cell.
Does your storyboard have the right prototype cell? ReuseIdentifier Cell and Custom Class pictureCell?


You should start type names with Capital letters, that's the style of Swift.
One more, if your code does not have a line import SwiftUI, [swiftui] is not the right tag.
Would I add the nib class in the function scope or the class scope?

Would I add the nib class in the function scope or the class scope? 

Sorry, but I do not understand what you mean by the function scope or the class scope.

Please clarify how have you set up your prototype cell in the storyboard.
You just need to register the nib. Typically in viewDidLoad:

Code Block
        tableView.register(nib, forCellReuseIdentifier: "Cell")

Getting "libc++abi.dylib: terminating with uncaught exception of type NSException" error
 
 
Q