In a regular iOS Xcode project, when you create a Cocoa touch file (MyVC.swift), you can also create an associated xib (MyVC.xib). Call super.init(nibName: nil, bundle: nil) in the view controller, and then the outlets are ready to be used.
In this case, I'm attempting to port over code from my project, into a Swift Package, which will get reused across other projects. When in the Swift Package, I cannot find a way to load the xib for my view controller. After hooking everything up correctly, and calling super.init(nibName:bundle:), the outlets are still always nil at the time of viewDidLoad.
Is this possible in a Swift Package? If so, how; if not, are there any go-to alternatives? This feels like a pretty standard use case.
Fwiw, I'm using swift-tools-version 5.3, and my platform is .iOS(.v13)
A variety of inits that I've tried:
super.init(nibName: nil, bundle: nil)super.init(nibName: nil, bundle: .main)super.init(nibName: "\(Self.self)", bundle: .main)super.init(nibName: nil, bundle: .init(for: Self.self))super.init(nibName: "\(Self.self)", bundle: .init(for: Self.self))