I'm trying to convert a Carthage framework with resources to a Swift Package. My framework includes a view with a UITableView and a xib file containing a single UITableViewCell view. The view for the table view loads properly but when the table view attempts to dequeue a table view cell and reference an IBOutlet in the cell's class, it will crash. Should this be possible in a SPM now that resources are supported?
If I remove any outlets in the UITableViewCell, the dequeue works correctly and I can see the cell's view loaded into the table view. The issue appears to be around recognizing the class associated with the UITableViewCell in the Xib file.
The console includes the following error:
[Storyboard] Unknown class _TtC39SPMTableViewCellXib_SPMTableViewCellXib20XibTestTableViewCell in Interface Builder file.
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UITableViewCell 0x12df14d20> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key titleLabel.'
Here's an example repo to replicate the issue:
Including this package in an app and calling
TestXibLoading.beginViewDisplay(self)to begin loading and displaying the table view will trigger the crash.
Any help is greatly appreciated!