Closed carmelogallo closed 4 years ago
Hi,
I'm having the same kind of problem. The issue is that I have multiple windows in my app that shows overlay things on top of the main window.
My fix was to get the last
window instead of the first
. So:
private let appWindow: UIWindow? = {
if #available(iOS 13.0, *) {
return UIApplication.shared.connectedScenes
.first { $0.activationState == .foregroundActive }
.map { $0 as? UIWindowScene }
.map { $0?.windows.last } ?? UIApplication.shared.delegate?.window ?? nil
}
return UIApplication.shared.delegate?.window ?? nil
}()
I think it's better and will work with more code base.
I'm facing this issue too on iOS 13. Suggested solutions to change from "first" to "last" works. Thanks! Is this in any PR?
Has any of you made PR on this issue? Else I will do it.
@JMCPH Feel free to do it.
The fix in merged PR #254 doesn't seem to be present in the latest version of the library. Is it true ?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed due to inactivity.
Hi there, it seems this fix is not included in latest library. Shall we reopen the PR?
Replacing
with
solved the problem.