I can launch my app when I want to display an alert this error appear : fatal error: unexpectedly found nil while unwrapping an Optional value
The error line : let rv = UIApplication.sharedApplication().keyWindow! as UIWindow
Hi, I am getting the same error,
: let rv = UIApplication.sharedApplication().keyWindow! as UIWindow
did you find a solution?
Window must not be set in viewDidLoad so instead I moved code to viewDidAppear and to works fine.
It's right, now it's working, thanks, but maybe this AlertView can be better if it's work in the ViewDidLoad too ...
Most helpful comment
Window must not be set in viewDidLoad so instead I moved code to viewDidAppear and to works fine.