i started the migration to Xcode 9 & iOS 11 build today.
in my storybased app, the following code:
self.performSegue(withIdentifier: Const.UI.Segue.showIntro, sender: self)
private func handleSuccessfulLogin() {
self.log.info("Logged In")
DispatchQueue.main.async(){
self.performSegue(withIdentifier: Const.UI.Segue.showIntro, sender: self)
}
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
print("starting segue " + segue.identifier!)
}
override func shouldPerformSegue(withIdentifier identifier: String, sender: Any?) -> Bool {
print("should perform segue")
return true
}
> Logged In
> starting segue showIntroSegue
handleSuccessfulLogin()
AWSCognito / AWSFacebookSignInProvider
continue with facebook
OperationQueue.main.addOperation {
[weak self] in
self?.performSegue(withIdentifier: Const.UI.Segue.showIntro, sender: self)
}
I found the solution to be at a completely different place (as so often).
The reason was that I had a logic in place in applicationDidBecomeActive
that was replacing the current storyboard (bad approach!) - the additional popup from the FB Kit led to a recreation of my container view controller. Thus i had self.navigationController == nil
during the call to perform the segue.