This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4047936-swift-package-manager-creating-a-swift-package
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4047936-swift-package-manager-creating-a-swift-package
This is good stuff, but I have yet to find a tutorial on how to include a Storyboard or XIB in your package. I can do it in CocoaPods, but not for SPM.
For example, for CocoaPods, I do this:
let podBundle = Bundle(for: BundleViewController.self)
let bundleURL = podBundle.url(forResource: “BundleName”, withExtension: “bundle”)
let bundle = Bundle(url: bundleURL!)!
guard let bundleView = bundle.loadNibNamed(“BundleName”, owner: self, options: nil)?.first as? BundleView else {return}
What would be the equivalent for SPM if I want to load this BundleViewController?
Never mind. I just read https://forums.swift.org/t/swift-pm-bundles-and-resources/13981 and discovered that bundles are not yet supported in SPM
@createch Thank you for sharing this - much appreciated! :]
I’m getting the following error on the TILApp, any ideas?
‘openssl/conf.h’ file not found
@sezertunca ah yeah, there are some dependencies you’ll need to make it work. I think the minimum you need is brew install pkg-config libssl-dev
Thank you, installing vapor and then libressl fixed it.