Custom entry point to app without storyboard initial point Navigate from app delegate swift
Solution:
In scene delegate class change the code like below
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene) else { return }
let window = UIWindow(windowScene: windowScene)
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let initialViewController = storyboard.instantiateViewCont
window.rootViewController = initialViewController
self.window = window
window.makeKeyAndVisible()
}
Also remove the entry point from storyboard like one viewcontroller is to be in initialviewcontroller remove that and also goto target and select build settings inside that remove the main in storyboard as like below
Comments
Post a Comment