-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Issue
'keyWindow' was deprecated in iOS 13.0 : Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes
Where
GADManager.swift:455, 459
Solution
- Add extension for UIApplication
extension UIApplication {
var keyRootViewController: UIViewController? {
guard let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene else { return nil }
return windowScene.windows.first(where: { $0.isKeyWindow })?.rootViewController
}
}- Replace keyWindow... with keyRootViewController
Metadata
Metadata
Assignees
Labels
No labels