In our AppDelegate application method we're accessing the root view controller:
let splitViewController = self.window!.rootViewController as! UISplitViewController
.... set variables on splitViewController
Then after successfully logging in we redirect to the root view controller:
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let controller = storyboard.instantiateViewController(withIdentifier: "Home") as UIViewController
self.present(controller, animated: true, completion: nil)
But it seems that this login process is wiping out the variables that were set in step #a. Presumably as in step #b we're recreating the controller. How can we redirect without wiping out the variables set in #a?