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: UIScenewillConnectTo session: UISceneSessionoptions connectionOptions: UIScene.ConnectionOptions) {

        guard let windowScene = (scene asUIWindowSceneelse { return }

        let window = UIWindow(windowScene: windowScene)


        let storyboard = UIStoryboard(name"Main"bundlenil)

        let initialViewController = storyboard.instantiateViewController(withIdentifier"MyVC")

        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





Then run the app it will works as per your requirement..Happy coding..


Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift