Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXC_BAD_INSTRUCTION on UIApplication extension force unwrap on flatMap #210

Open
revdevnick opened this issue Jan 10, 2019 · 3 comments
Open

Comments

@revdevnick
Copy link

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?

@iOS-Ashish
Copy link

@revdevnick did you find any solution?

@LeXuanKhanh
Copy link

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 #233

@abynim
Copy link

abynim commented May 28, 2020

A workaround in two steps:

  1. Add a var window: UIWindow? in AppDelegate
  2. Set its value at the end of SceneDelegate's scene(_ scene: willConnectTo: options:):
if let appDelegate = UIApplication.shared.delegate as? AppDelegate {
    appDelegate.window = window
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants