'Could not find a storyboard present in static custom framework
So, I made myself a custom framework using pod, everything was working fine, the app was building fine, I was able to load from storyboard present in that framework. Then, I decided to make the framework as static and changed the MACH-O type of the framework target as static, now the app is crashing as it is not able to find storyboard and the bundle which is now returning nil. This is how I am calling my storyboard in SceneDelegate,
guard let windowScene = (scene as? UIWindowScene) else { return }
let window = UIWindow(windowScene: windowScene)
let bundle = Bundle(identifier: "com.UIBundle")
let storyboard = UIStoryboard(name: "Login", bundle: bundle)
self.window = window
window.rootViewController = storyboard.instantiateViewController(withIdentifier:
"LoginPageVC") as? LoginPageVC
window.makeKeyAndVisible()
I came to know that static framework cannot keep storyboards or xib, so I tried making a new target bundle and upon calling that it is also giving nil. Please suggest some solutions.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
