Skip to content

Commit

Permalink
Fixed "'shared' is unavailable in application extensions for iOS: Use…
Browse files Browse the repository at this point in the history
… view controller based solutions where appropriate instead." (#365)
  • Loading branch information
tladesignz committed Jan 30, 2023
1 parent baa1393 commit 82790b6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import UIKit
@available(iOS 13.0, *)
extension UIApplication {
public func findKeyWindow() -> UIWindow? {
return UIApplication.shared.connectedScenes
return connectedScenes
.filter({$0.activationState == .foregroundActive})
.compactMap({$0 as? UIWindowScene})
.first?.windows
Expand Down

0 comments on commit 82790b6

Please sign in to comment.