CoronaViewController fails to present in templates

I was just trying to create a new project with the latest templates I found on the GitHub, but was getting this warning:

Warning: Attempt to present <CustomAlertController: 0x7b287800> on <CoronaViewController: 

0x7b27ec00> whose view is not in the window hierarchy!

and the coronaView would not display.  I changed the viewDidLoad() override func to viewDisAppear( animated: Bool ) and that solved the issue for me.

@tonygod, I’ve been getting around that by wrapping native.showAlert() inside a

timer.performWithDelay( 100, function() &nbsp;&nbsp;&nbsp; native.showAlert(...) end)

But, I’m curious about your substitution of viewDidAppear for viewDidLoad. Can you show exactly where you did that?

(should mention that I’m talking about Enterprise, not CoronaCards, but the “not in the hierarchy” error I get is the same).

Thanks!

@RealHandy, all I did was change the definition “viewDidLoad()” with “viewDidAppear( animated: Bool )” and that’s it.  It is defined in the ViewController.swift file.

@tonygod, I’ve been getting around that by wrapping native.showAlert() inside a

timer.performWithDelay( 100, function() &nbsp;&nbsp;&nbsp; native.showAlert(...) end)

But, I’m curious about your substitution of viewDidAppear for viewDidLoad. Can you show exactly where you did that?

(should mention that I’m talking about Enterprise, not CoronaCards, but the “not in the hierarchy” error I get is the same).

Thanks!

@RealHandy, all I did was change the definition “viewDidLoad()” with “viewDidAppear( animated: Bool )” and that’s it.  It is defined in the ViewController.swift file.