Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Source/Infra/EKWindow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ class EKWindow: UIWindow {
init(with rootVC: UIViewController) {
if #available(iOS 13.0, *) {
// TODO: Patched to support SwiftUI out of the box but should require attendance
if let scene = UIApplication.shared.connectedScenes.filter({$0.activationState == .foregroundActive}).first as? UIWindowScene {
let scenes = UIApplication.shared.connectedScenes
let candidateScene = scenes.first { $0.activationState == .foregroundActive } ?? scenes.first
if let scene = candidateScene as? UIWindowScene {
super.init(windowScene: scene)
} else {
super.init(frame: UIScreen.main.bounds)
Expand Down