EXC_BREAKPOINT
springlo opened this issue · comments
springlo commented
static var applicationWindow: UIWindow {
return (UIApplication.shared.delegate?.window?.flatMap { $0 })!
}
in Xcode 11, UIApplication.shared.delegate?.window = nil
icezerio commented
how to resolve ?
Ali M Irshad commented
@Visaut What do you want to achieve?
icezerio commented
@alimirshad in Line : return (UIApplication.shared.delegate?.window?.flatMap { $0 })!
Error -> "Fatal error: Unexpectedly found nil while unwrapping an Optional value"
use Xcode 11 , How to resolve ?
Ali M Irshad commented
@Visaut you need to get Window from UIView. or if you need it in app delegate you need to assign the window to appdelegate window property. you can't force unwrap it like you are doing
icezerio commented
Thank you @alimirshad