ImageViewer
ImageViewer copied to clipboard
EXC_BAD_INSTRUCTION on UIApplication extension force unwrap on flatMap
I find when initializing the GalleryViewController that a crash happens on line 14 in UIApplication.swift. While using flatMap there is a force unwrap which is crashing my application. This needs to be handled properly and why is this happening?
@revdevnick did you find any solution?
did this bug fix yet, i use version 6.0.0 and have the same issue, i found the issues that have the same problem but the i dont understand the answer #223 https://github.com/Krisiacik/ImageViewer/issues/233
A workaround in two steps:
- Add a
var window: UIWindow?in AppDelegate - Set its value at the end of SceneDelegate's
scene(_ scene: willConnectTo: options:):
if let appDelegate = UIApplication.shared.delegate as? AppDelegate {
appDelegate.window = window
}