Closed llKoull closed 5 years ago
Hi, I can't reproduce your issue, but certainly if UIApplication.shared.keyWindow
would be nil
, app would crash. I've added if let
statement instead of force unwrapping UIApplication.shared.keyWindow!
. Please check if issue is fixed in version 2.0.10
.
Great! thanks for your help @Jercik ^_^
Hi!
I'm using this library in my App but i detected some crashes in LiveChat.swift line 117
NotificationCenter.default.addObserver(forName: NSNotification.Name.UIApplicationDidBecomeActive, object: nil, queue: nil) { (notification) in self.window.frame = UIApplication.shared.keyWindow!.frame }
Maybe the problem is that keyWindow is nil and when it tries to access, the app gets crashed. Do you think that delaying the execution of
self.window.frame = UIApplication.shared.keyWindow!.frame
could be a solution?Thanks and best regards,