Crashes when use Storyboards and XIBs over Swift package manager

Viewed 612

we have a UI Library in Swift that contains our company UI elements for iOS Apps (there are some xibs, some storyboards and some swift code).

We have decided to add the support for swift package manager for this lib (before was added with Cocoapods) and there are some crashes whenever there is an IBOutlet connection between a xib file and swift code, or when there is a connection between a UIViewController in a storyboard and the class of that UIViewController in swift.

The same code with Cocoapods work perfectly, we only have those crashes when we install the library with swift package manager. We are using the bundle: Bundle.module.

Anyone has some similar crashes? Ideas?

1 Answers

The app will crash with "Thread 1: EXC_BAD_ACCESS (code=1, address=x)" error if the Module name in the storyboard inspector does not match with the SwiftPM Product name. In my case, I faced this error after renaming the package name, because I forgot to change the Module name to correct one in the storyboard.

enter image description here

Related